AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
The text data used during redraw (pointed to by r_data) can contain
control chracters to change font etc. The format these take is a 0
byte, followed by the control code, then any data that the code takes. These
can be skipped by ZapRedraw_FindCharacter, to convert a text offset into a
data offset.

The following control characters are currently defined:

Code     Meaning

0,1,f,b          Change foreground, background colour to f,b (offsets into the palette table)
0,2          Finish line - the rest of the line is cleared to the current background colour.
0,3,l,h          16 bit character - print character n = l + 256 * h
0,4,f,b,x,y     Merge character x,y
0,5          For internal use only.
0,6,f          Change foreground colour to f
0,7,b          Change background colour to b
0,8,f,b,x,y     Merge cursors x,y
0,9,s          Change to substyle s
0,10,f,b,s     Change to foreground colour b, background colour f, and substyle s.

Merging characters
Control code 0,4,f,b,x,y merges characters x,y. If a pixel is clear in the
bitmap for y then the pixel is drawn according to the bitmap for x and the
current for/background colours. If the pixel is set for y then the colours
f/b are used instead for the x pixel. Useful for laying a cursor on top of
the character. This effect is simulated in VDU mode by using sprites and
masks. This leaves the current foreground and background colours unaltered.

NB x and y may contain control codes as well. Eg you could have x = 0,0 and
y = 0,3,0,1. If you nest 0,4 codes (ie either x or y contain 0,4) then only
the most deeply nested one will have effect.

Control code 0,8,f,b,x,y merges cursors, where y is the cursor character.
This is similar to 0,4 but only works for characters &7F, &100-&105. For &7F,
it masks in the block simply by changing the for/bac colours of the current
character being printed. For &100+, the square or line is plotted over the
top of the character in the background colour b.

[sh-index] Back to list of manuals