Previous: 4.51.2.1.3. done() To the Table of Contents Next: 4.51.2.1.5. getBlitMask()
4.51.2.1.3. done() Table of Contents 4.51.2.1.5. getBlitMask()

- 4.51.2.1.4. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.2. ObjGfx40 Unit Object Types
4.51.2.1. ogBlit object
4.51.2.1.4. get()


4.51.2.1.4. get()

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

Copies a region of an ogSurface into a blit.

Declaration:
  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 white rectangle denotes coordinates passed to get()
Coloured lines signify borders of the actual blit data.

Restrictions:

The blit geometry cannot have a single scanline with more than 255 runs.

See also:







Previous: 4.51.2.1.3. done() To the Table of Contents Next: 4.51.2.1.5. getBlitMask()
4.51.2.1.3. done() Table of Contents 4.51.2.1.5. getBlitMask()

- 4.51.2.1.4. -