4.51.2.1.3. done() | Table of Contents | 4.51.2.1.5. getBlitMask() |
procedure get(var srcObject:ogSurface; x1, y1, x2, y2:int32); virtual;Remarks:
Blits are transparent sprites. Transparency, in this case, refers not to alpha level, but rather to the removal of a specific colour (usually 0) from the image. This allows blits to be overlaid onto other images. Blits differ from sprites in that they don't contain a rectangular image internally. Instead, the original rectangular region is converted into a blit mask and pixel data. The blit mask defines the geometry of the blit. The pixel data is the original image with the transparent colour removed. Because of this separation, rendering the blit is much faster than the standard method of comparing each pixel against a transaprent colour when displaying.
Each region of transparent colours is changed into an offset and a count and added to the blit mask. The count defines the next run of contiguous pixels that lack the transparent colour.
The rectangular region specified becomes the bounding box around the actual blit. The width and height of the blit are calculated from this initial bounding box.
The blit geometry cannot have a single scanline with more than 255 runs.
See also:4.51.2.1.3. done() | Table of Contents | 4.51.2.1.5. getBlitMask() |