[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TCustomBitmap

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomBitMap - the base class for TBitmap

## Declaration

Source position: graphics.pp line 1363

`type TCustomBitmap = class(TRasterImage)`
`protected`
`procedure MaskHandleNeeded; override;` |  | MaskHandleNeeded - method to signal that a handle is required for the Mask
`procedure PaletteNeeded; override;` |  | PaletteNeeded - method to signal that a Palette is required
`function CanShareImage(); override;` |  | CanShareImage - returns True if specified class of image can be shared
`procedure Changed(); override;` |  | Changed - method to call when properties have changed
`function CreateDefaultBitmapHandle(); override;` |  | CreateDefaultBitmapHandle - returns a bitmap handle matching the description ADesc
`procedure FreeMaskHandle;` |  | FreeMaskHandle - method to release Mask handle
`function GetBitmapHandle; override;` |  | GetBitmapHandle - returns a Birmap Handle for the Image
`function GetMaskHandle; override;` |  | GetMaskHandle - returns a bitmap handle for the Mask
`function GetPalette; override;` |  | GetPalette - returns a Handle for the Palette
`function GetPixelFormat; override;` |  | GetPixelFormat - returns the pixel format for the Image
`function GetRawImagePtr; override;` |  | GetRawImagePtr - returns a pointer to the Raw Image
`function GetRawImageDescriptionPtr; override;` |  | GetRawImageDescriptionPtr - returns a pointer to a raw image description
`procedure HandleNeeded; override;` |  | HandleNeeded - method to signal that a handle is required
`function InternalReleaseBitmapHandle; override;` |  | InternalReleaseBitmapHandle - releases Bitmap Handle and returns its value
`function InternalReleaseMaskHandle; override;` |  | InternalReleaseMaskHandle - releases Mask Handle and returns its value
`function InternalReleasePalette; override;` |  | InternalReleasePalette - releases Palette Handle and returns its value
`procedure RawimageNeeded();` |  | RawimageNeeded - method to signal that a raw image is required; if ADescOnly is True, only a descriptor is required
`procedure SetHandle(); override;` |  | SetHandle - specifies Handle for Image
`procedure SetPixelFormat(); override;` |  | SetPixelFormat - specifies the format for Pixels in this Image
`procedure UnshareImage(); override;` |  | UnshareImage - stops an image from being shared: if CopyContent is True, the Image gets copied
`function UpdateHandles(); override;` |  | UpdateHandles - called when handles are created from rawimage (true when handle changed)
`public`
`constructor Create; override;` |  | Create - constructor for TCustomBitmap: performs inherited Create and initialises pixel format
`destructor Destroy; override;` |  | Destroy - destructor for TCustomBitmap: frees any Mask handles, then performs inherited Destroy
`procedure Clear; override;` |  | Clear the resources used by the Graphic, leaving a blank Graphic
`function GetResourceType; override;` |  | GetResourceType - returns the type of a resource to be used in the graphic
`function LazarusResourceTypeValid(); override;` |  | Check that the Resource specified for reading or writing is a valid type - result True if it is
`function BitmapHandleAllocated; override;` |  | BitmapHandleAllocated - returns True if a handle has been allocated for the Bitmap
`function MaskHandleAllocated; override;` |  | MaskHandleAllocated - returns True if a handle has been allocated for the Mask
`function PaletteAllocated; override;` |  | PaletteAllocated - returns True if a Palette has been allocated
`function ReleaseHandle;` |  | Release the bitmap handle, effectively freeing resources
`procedure SetHandles(); override;` |  | SetHandles - allows the user to specify handles
`procedure SetSize(); override;` |  | SetSize - allows the user to specify the size of the Bitmap
`property Handle: HBITMAP; [rw]` |  | The operating system Handle ssociated with this bitmap
`property HandleType: TBitmapHandleType; [rw]` |  | The type of system handle
`property Monochrome: Boolean; [rw]` |  | Whether using monochrome display
`end;`

## Inheritance

`TCustomBitmap` |  | TCustomBitMap - the base class for TBitmap
`TRasterImage` |  | TRasterImage - base class for a number of graphic controls, including TCustomBitmap and TCustomIcon, which use a raster of dots to display graphic information
`TGraphic` |  | TGraphic - Base class for dealing with Graphic images
`TPersistent`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net .