h6. [[DrawFile]] h6(. » [[DrawFile SWI Calls|SWI Calls]] h6((. » DrawFile_Render h2. DrawFile_Render h5. (SWI &45540) |_<^{width:4em}. Entry | | |<^. R0 |<^. "Flags":#flags | |<^. R1 |<^. Pointer to [[Draw File Format|drawfile block]] | |<^. R2 |<^. Length of block | |<^. R3 |<^. [[Transformation Matrix|Transformation matrix]], or 0 to use identity | |<^. R4 |<^. Pointer to [[Font Bounding Box|clipping rectangle]] in OS units, or 0 for none | |<^. R5 |<^. Flatness with which to render lines (if bit 2 of R0 set) | |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | |<^. R2 |<^. Preserved | |<^. R3 |<^. Preserved | |<^. R4 |<^. Preserved | |<^. R5 |<^. Preserved | h4(#flags). Flags |_<^{width:4em}. Bit|_<^. Meaning if set | |<^. 0 |<^. Render bounding boxes (as dotted red rectangles) | |<^. 1 |<^. Do not render the objects themselves | |<^. 2 |<^. Use R5 as flatness | h4. Use The purpose of this call is to render a DrawFile to the screen. h4. Notes This SWI renders a DrawFile at a given screen position where that position is defined as screen position 0, 0 with the x- and y-translations as specified in the transformation matrix. Hence, to render a non-rotated 1:1 draw file at (x, y) (screen coordinates in OS units) the transformation matrix is : |<^{width:6em}. |>^{width:6em}. | |<^. (1 << 16|>^. 0)| |<^. (0|>^. 1 << 16)| |<^. (256 * x |>^. 256 * y)| The clipping rectangle is typically a redraw rectangle returned by the Wimp on a redraw window request. If R4 = 0, then the whole draw file is rendered. If non-zero, only objects which intersect the clipping rectangle are rendered. h4. See also * [[File formats: DrawFile|DrawFile format]] * [[DrawFile_BBox]] * [[DrawFile_DeclareFonts]] * [[Transformation Matrix|Transformation matrix]]