Translucent sprite operation
Translucent - partially transparent - sprite rendering has been provided within the SpriteExtend module. This relies on certain other modules being present (suitable InverseTable and BlendTable modules) and requires application support before it will be visible to the user. All non-translucent graphic operations remain as before.
Translucent operations apply to all sprite depths *, rendered in all output depths
*.
Translucency
Translucency is measured as a value from 0 to 255. At 0 no translucency is applied and the image is rendered as previously. At 128 the sprite is blended half and half with the background. At 255 the image is almost totally transparent.
API changes
Sprite operations through the SpriteExtend entry points for PutSpriteScaled, and the JPEG operations JPEG_PlotScaled, JPEG_PlotFileScaled, JPEG_PlotTransformed and JPEG_PlotFileTransformed have updated APIs to handle the translucent operations.
OS_SpriteOp 52 (PutSpriteScaled)
OS_SpriteOp 56 (PutSpriteTransformed)
The plot action has been extended :
bits 8-15 = translucency to render the image at (0-255)
JPEG_PlotScaled
JPEG_PlotFileScaled
The plot flag bits have been extended :
bits 4-11 = translucency to render the image at (0-255)
JPEG_PlotTransformed
JPEG_PlotFileTransformed
The transformation flag bits have been extended :
bits 5-12 = translucency to render the image at (0-255)
* Except CMYK.
Transformed sprite plotting
Rendering translucent sprites transformed is not presently supported by SpriteExtend.
|