AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
=>     R0 =     Reason:
             1     Cache font in current wimp mode
             2     Cache font in mode 0 with background 0 and foreground 1

<=     R0 and flags corrupted

This SWI takes an anti-aliased font and caches a range of characters as
bitmaps (see r_caddr). The cacheing can be done in any colours or screen
resolution. Of course only those with foreground colour all bits set and
background colour all bits clear can be used directly by
ZapRedraw_RedrawArea. However, by giving a foreground colour mask of -1 and
a background mask of 0 any bitmap can be drawn (see r_caddr etc). An
hourglass with a percentage is shown during the operation.
ZapRedraw_CacheFontChars 1
=>     R0 =     1
     R1 =     redraw block with the following set up:
              r_bpp          =     number of bits per pixel to cache at
              r_caddr          =     address of cache with space reserved for the chars
              r_cbpl / cbpc / r_charw / r_charh
              r_for / r_bac     =     offset in r_palette of for and bac cols
              r_palette     =     palette of colours as for VDU redraw mode
                            (ie each entry of form &BBGGRRxx)
              r_workarea     =     room for 64 bytes + single sprite
                            (use ZapRedraw_SpriteSize).
              r_mode          =     mode to cache font in (ie mode sprite defined in)
     R2 =     pointer to font name
     R3 =     Lower 16 bits:font size to plot at (points)
           Upper 16 bits:font aspect ratio to use (=Y/Xx100) (or 0)
     R4 =     x os offset (from bottom left) to plot character in the box
     R5 =     y os offset (from bottom left) to plot character in the box
     R6 =     first character to cache (0 caches as &30 and 1-&1F have &40
           added &7F is ignored).
     R7 =     last character to cache (inclusive)
ZapRedraw_CacheFontChars 2
=>     R0 =     2
     R1 =     redraw block with the following set up:
              r_caddr =     address of cache with space reserved for the chars
              r_cbpl / cbpc / r_charw / r_charh
              r_workarea =     as for R0=1
              r_magx, r_magy for mode used with reason code R0=1
     R2-R7 as for reason code 1.
     
Font size is scaled up by 2^(1-r_magx) horizontally and
2^(2-r_magy) vertically so the characters are the same pixel
size as those cached with R0=1.


[sh-index] Back to list of manuals