TIvoryMapper
Version 1.0 Beta 2

The image mapper component.


The component looks like this on the component palette

Description

TIvoryMapper is an image mapper component.

It's a common problem that you've got a lot of small images and you want to handle all of them together. The solution is to place them side by side on a large bitmap, and if you need to show one of the bitmaps, you just copy the appropriate portion of the large bitmap to the backbuffer. This is exactly what TIvoryMapper does. It owns an off-screen surface and a bitmap on it, and lets you divide the bitmap into small parts. All of the small bitmaps on the large bitmap must be of the same size, and they must be ordered side by side and line by line. Here's an example of a matrix of 6 small images:

TIvoryMapper helps you working with an array of small images. You only need to specify the file name of the large bitmap, and the size and the number of the small bitmaps. You can use TIvoryMapper as a basis of a 2D map, or as a component that holds animated bitmaps.

Hierarchy

TObjectTPersistentTComponentTIvoryMapper

Properties
Bitmap
Surface
TileColumns
TileHeight
TileRect
TileRows
Tiles
TileWidth
Transparent
TransparentColor

Methods
~TIvoryMapper
TIvoryMapper

Events

This component doesn't have any events.


Back to the Ivory Draw page