Hi Aldo,
that´s what you just can do .... Print text with different foreground and background colors ....
I already created different fonts and I also made a "font-generator".
If you are interested, I can mail this files to you, give me just a short mail to
[email protected]
Gerhard
------------------
Announcement
Collapse
No announcement yet.
Text background in screen 12
Collapse
X
-
Gerhard,
thanks for the reply. I must admit German isn't a language I can unterstand at a glance, nevertheless I looked at the code. The advantage of your method is you can locate the text on a pixel alignmen; the disadvantage is you need your own character generator. Hence, not as simple as I liked, but much more versatile: it can be even modified to handle other font sizes (i.e. 5x7 or whatever else). If I'm not wrong, TurboPascal used a method similar to this one, and had a full series of character generators... I'll look there.
Unfortunately this method can't be used via PRINTs or PRINT USINGs. We must wait until PowerBasic add a FORMAT$ to the compiler, or add a statement to print to memory (like sprintf() of c). What I need this moment is a simple way to PRINT on a SCREEN 12 with background colors...
Aldo
------------------
Leave a comment:
-
-
Have a look to the german PB forum
http://www.kirschbaum-software.biz/u...b=5&o=&fpart=1
There I already posted some code, doing this ....
G.
------------------
Leave a comment:
-
-
Text background in screen 12
I need to print text on screen 12, with different background colors. At the moment I use the following method (let's say I need to print something COLOR 7, 2):- print a full char ( chr$(219) ) with the background color I need (color 2)
- get the character region of the screen to an array
- print the character I need with color foreground xor background (7 xor 2 = 5)
- put the array to the character screen region using option XOR: the foreground changes from 5 to 7, background from 0 to 2.
- repeat all the above for each character (or string...)
------------------
[This message has been edited by Aldo Cavini (edited July 24, 2003).]Tags: None
Leave a comment: