h6. [[OS SWI Calls]] h6(. » [[OS_SpriteOp]] h6((. » OS_SpriteOp 55 - Plot Mask Transformed h2. OS_SpriteOp 55 - Plot Mask Transformed h5. (SWI &2E) |_<^{width:4em}. Entry | | |<^. R0 |<^. 55 (Reason code) + [[OS_SpriteOp|Area value]]| |<^. R1 |<^. Unused/[[Format Of Sprite Area|Sprite area]] (as defined by area value in R0) | |<^. R2 |<^. Sprite name/[[Format Of Sprite|pointer]] (as defined by area value in R0) | |/3<^. R3 |<^. Flags: | |<^. Bit 0: 1 -> R6 is destination coordinate block. 0 -> R6 is a matrix. | |<^. Bit 1: 1 -> R4 is source coordinate block in sprite | |<^. R4 |<^. Source coordinate block in sprite | |<^. R6 |<^. Coordinate block/[[Transformation Matrix|matrix]] | |_<^{width:4em}. Exit | | |\2<^. All registers preserved| h4. Use This call paints a transformed sprite mask to the screen. For sprite pixels where the mask is non-zero, the corresponding screen pixel will be set to the currently selected background colour. If the mask is zero the screen pixel will not be updated. If R3 bit 0 is clear, R6 is treated as a pointer to a Draw module [[Transformation Matrix]] describing the transform to apply to the mask. If bit 0 is set then R6 is treated as a pointer to a block giving the screen coordinates of a parallelogram to transform the mask into: |_<^{width:4em}. Word |_<^. Value | |<^. 0 |<^. X0 coordinate, in 1/256th OS units | |<^. 1 |<^. Y0 coordinate, in 1/256th OS units | |<^. 2 |<^. X1 coordinate, in 1/256th OS units | |<^. 3 |<^. Y1 coordinate, in 1/256th OS units | |<^. 4 |<^. X2 coordinate, in 1/256th OS units | |<^. 5 |<^. Y2 coordinate, in 1/256th OS units | |<^. 6 |<^. X3 coordinate, in 1/256th OS units | |<^. 7 |<^. Y3 coordinate, in 1/256th OS units | If R3 bit 1 is set then R4 is treated as a pointer to a coordinate block specifying a subrectangle of the mask to render from, with coordinates given in pixels: |_<^{width:4em}. Word |_<^. Value | |<^. 0 |<^. x0 coordinate | |<^. 1 |<^. y0 coordinate | |<^. 2 |<^. x1 coordinate | |<^. 3 |<^. y1 coordinate | When specifying a destination parallelogram, the source rectangle is mapped onto the destination as follows: <pre> x0,y0 -> X0,Y0 x1,y0 -> X1,Y1 x1,y1 -> X2,Y2 x0,y1 -> X3,Y3 </pre> h4. Notes See [[OS_SpriteOp Scaled/Transformed Plot Flags]] for details on how the flags affect the plot operation and dictate some of the input parameters. When used on a sprite without a mask, all pixels within the destination parallelogram will be filled with the background colour. h4. See also * [[Format Of Sprite]] * [[Format Of Sprite Area]] * [[OS_SpriteOp]] * [[Transformation Matrix]]