title: "vbmClearText" description: TRSE built-in method (from IDE help)
vbmClearText
Systems: VIC20
Parameters: a, a, b, b, b
vbmClearText( [address-text], [address-chars], [byte-x], [byte-y], [byte-lineheight]);
- [address-text] - address of a CSTRING, the message to display
- [address-chars] - address of the characterset to use for the font
- [byte-x] - X column (0-19) to display the message
- [byte-y] - Y line (0-183) to display the message
- [byte-lineheight] - Line spacing when text wraps
Description
Cuts-out a text message on the bitmap using the given font. Text will wrap around when the end of a line is reached and move down by the number of pixels specified by the line height parameter. The character font will erase or cut-out pixels on the bitmap.
There are four ways to draw text:
- vbmDrawText - draws the text message, replacing the pixels at the current position on the bitmap
- vbmDrawTextO - draws the text message and merges it over the current pixels on the bitmap
- vbmDrawTextE - draws the text message and merges it using the EOR operation with the bitmap
- vbmClearText - clears, or 'cuts out' the text message from the pixels on the bitmap
Example
font: incbin("font8x8.bin", $4000); // first 64 PETSCII Screen Codes
...
message: cstring = "HELLO WORLD - IN CAPS";
...
// draw text at column 2, line 10 (pixels) with a line height of 14
vbmClearText( message, font, 2, 10, 14 );
See also
- vbmDrawBCD