Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:19 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Inverted Text

Author Message
RicM
Regular Member

Joined: 05/02/2022
Location: Australia
Posts: 52
Posted: 02:23am 13 Jul 2022
Copy link to clipboard 
Print this post

Dear Readers,

Has anyone has a program to INVERT the text on the CMM2

Regards

RicM
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:47am 13 Jul 2022
Copy link to clipboard 
Print this post

The 'Inverted text" option in MMBasic prints the text rotated 180 degrees.
If you want a mirror image with the text reading left to right, you could reverse your strings before printing.
Another option would be to use blit or sprites.
A third option would be to modify a font to invert the characters.

And there are probably other methods as well.

Depending on what you are trying to achieve, the first option (reverse a string then print inverted) is the simplest.

Jim

 CLS
 TEXT 400, 250, "Inverted Text", "LMI", 5
 TEXT 400, 350, reverse("Mirrored Text"), "LMI", 5
 
FUNCTION reverse(txt$) AS STRING
 LOCAL n, rev$
 FOR n = 1 TO LEN(txt$)
   rev$ = MID$(txt$,n,1) + rev$
 NEXT n
 reverse = rev$
END FUNCTION

edit again. Reversing the string then invert rotates each character so is not a true mirror.
IT depends on your requirements.
Edited 2022-07-13 13:00 by TassyJim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:06am 13 Jul 2022
Copy link to clipboard 
Print this post

Using BLIT
 CLS
 TEXT 200, 300, "Mirrored Text", "lt", 5,1,RGB(RED)
 BLIT READ #1,200,300,350,30
 BLIT WRITE #1,200,330,&B010
 TEXT 200, 300, "Mirrored Text", "lt", 5,1
 DO:LOOP UNTIL INKEY$<>""

VK7JH
MMedit
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025