SWI Font_Paint Questions
Kuemmel (439) 384 posts |
A question regarding SWI Font_Paint special characters as I can’t test it at the moment by try and error… The documentation here says that you can use e.g. control register 19 to set the colours directly in the string without using the SWI ColourTrans_SetFontColours before. I says there should be no spaces between the control sequence fields. So how would one construct that string with control code 19 to use Font_Paint within BASIC to plot a Hello World ? Would that be a$=CHR$(19) + CHR$(bg_R) + CHR$(bg_G) + CHR$(bg_B) + CHR$(fg_R) + CHR$(fg_G) + CHR$(fg_B) + CHR$(offset)+"Hello World"? Or I need the comma or another format of the colours ? Another thing…while using “OS_write0” I can use CHR$(10)+CHR$(13) within the string to start at the next line. From some tests some time ago it seems using those LF/CR codes doesn’t work for Font_Paint or is there a workaround for plotting online fonts from Basic including a LF/CR ? |
Kuemmel (439) 384 posts |
Finally I got the chance to play with that control code…so the string example I give works, no commas needed and so you wouldn’t need the ColourTrans_SetFontColours SWI. …just for the LF/CR question regarding Font_Paint I didn’t find any clue…may be it’s just not supported and you have to do the LF/CR “manually” ? |
Rick Murray (539) 13840 posts |
That’s correct. The commas are only there to seperate one value from another in BASIC. What is actually sent to the VDU driver is the specified sequence of bytes (no commas!).
PRM 3-422 seems to imply that the 19,x… sequence calls ColourTrans_SetFontColours?
0, 10, and 13 are taken as string terminators.
In a word, yes. |