Skip to content
GR32>TCustomMapClass

TCustomMap

Abstract base class for two-dimensional data containers (bitmaps, vector maps, ordinal maps) with dimensions and resizing capabilities.

Inheritance:TObject > TPersistent > TPlainInterfacedPersistent > TNotifiablePersistent > TThreadPersistent > TCustomMap

Declaration

pascal
TCustomMap = class(TThreadPersistent)

Description ​

TCustomMap is the abstract base class for all two-dimensional mapped data structures in Graphics32, including TCustomBitmap32, ordinal maps (TByteMap, TFloatMap), and vector maps (TVectorMap). It establishes standard Width and Height management, buffer resizing routines, and dimension change notifications via OnResize.

Constructors ​

NameDescription
CreateInitializes a new TCustomMap instance, optionally setting initial dimensions.

Methods ​

NameDescription
ClearClears the map content or resets buffer memory.
DeleteSets map dimensions to zero and releases allocated buffer memory.
EmptyReturns True if either Width or Height is zero.
ResizedTriggers internal size change processing and fires OnResize.
SetSizeChanges the map dimensions to specified width and height.
SetSizeFromCopies dimensions from another map object or persistent container.
ChangeSizeProtected virtual method that performs buffer allocation and dimension updates.
SetHeightProtected setter method for the Height property.
SetWidthProtected setter method for the Width property.

Properties ​

NameTypeDescription
HeightIntegerVertical dimension of the map in units or pixels.
WidthIntegerHorizontal dimension of the map in units or pixels.

Events ​

NameTypeDescription
OnResizeTNotifyEventFired whenever the map dimensions (Width or Height) change.