Reason Action
0 Render draw file
1 Calculate bounding box
2 Register unknown object handler
Provided by DrawOp
Render draw file
Entry
R0 = 0
R1 = pointer to scaling and position table :
R1+00 = amount to multiply X by * 65536
R1+04 = 0
R1+08 = 0
R1+12 = amount to multiply Y by * 65536
R1+16 = X origin (OS units)
R1+20 = Y origin (OS units)
R2 = pointer to first object (ie. beginning of Draw file+40)
R3 = pointer to end of last object (ie. end of file)
R4 = pointer to graphics clip box, or 0 for no clipping :
R4+00 = XMin
R4+04 = YMin
R4+08 = XMax
R4+12 = YMax
Exit
F0-F2 corrupted if scaling is not 1:1
This call displays a draw file. Objects will be checked one by one to see if they are in the clipping area, and redrawn if they are. Currently the following objects are supported :
0 - font table
1 - text
2 - path
5 - sprite
6 - group
7 - tag
This is all the objects specified in the RISC OS 2 PRMs, except for text AREA objects, which are hardly ever used and are very very complicated. Magnifying a draw file by more than about 8 times is probably not a good idea because rounding errors in the Draw module will start to become significant.
Note that this call requires the ColourTrans module. It also requires the FPEmulator module, if and only if the scaling is not 1:1. This call replaces the old SWI WimpExt_RedrawDraw, which should now not be used. (This call is much better anyway.)
Calculate bounding box
Entry
R0 = 1
R2 = pointer to first object
R3 = pointer to end of last object
Exit
R4 = XMin (Draw units)
R5 = YMin (Draw units)
R6 = XMax (Draw units)
R7 = YMax (Draw units)
Calculates the bounding box of the specified objects. The coordinates are returned in Draw units (which are OS Units * 256). Grouped objects are not checked individually - the groups bounding box is used. Unknown object types will not be checked. (This call knows all the types described in the RISC OS 2 PRMs.) If no objects with bounding boxes are in the set specified then R4-R7 on exit are undefined.
Register unknown object handler
Entry
R0 = 2
R2 = pointer to routine (or 0 for no unknown object handler)
R3 = pointer to workspace
This routine will be called if the Render Draw File code encounters an unknown object. The routine has the following entry and exit conditions :
Entry (SVC mode)
R2 = pointer to object
R4 = pointer to scaling and position table
R6 = clipping rectangle XMin (pretransformed)
R7 = clipping rectangle YMin (pretransformed)
R8 = clipping rectangle XMax (pretransformed)
R9 = clipping rectangle YMax (pretransformed)
R12 = your workspace pointer
R13 = pointer to supervisor stack (at least 256 bytes guaranteed)
R14 = return address
Exit
R1-R11,R13 preserved
V flag set on error, with R0 pointing to standard error block
|
|
|