Class TAd2DBitmap

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAd2DBitmap = class(TAd2DCustomBitmap)

Description

TAd2dBitmap is used to transfer bitmap data between the host and the plugin dlls. TAd2dBitmap is only depended on AdTypes.pas. It does not contain any read/write functions for streams or files. You can use the scanline or the fast pixel property to manipulate the picture.

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public procedure ReserveMemory(AWidth, AHeight:integer);
Public procedure Clear;
Public procedure ClearAlphaChannel;
Public function ScanLine(AY:integer):Pointer; overload;
Public function ScanLine:Pointer; overload;
Public function Loaded:boolean;

Properties

Public property Pixels[X, Y:integer]: TAndorraColor read GetPixel write SetPixel;

Description

Methods

Public constructor Create;

Creates a instance of TAd2dBitmap and initializes all used variables.

Public destructor Destroy; override;

Destroys the instance of TAd2dBitmap and frees used memory.

Public procedure ReserveMemory(AWidth, AHeight:integer);

Use this procedure to reserve a specific amount of memory. This is important when loading bitmap data from a plugin dll via TAd2dTexture.SaveToBitmap.

Public procedure Clear;

Removes the loaded bitmap data from the memory. After calling this procedure the old content of the bitmap is no more existent. The memory occupied by the data can now be used for other purposes. Remember that all pointers on the bitmap data (from scanline) are invalid now.

Public procedure ClearAlphaChannel;

This procedure resets the alpha channel of the bitmap to 255.

Public function ScanLine(AY:integer):Pointer; overload;

Returns the pointer to the beginning of a pixel line.

Public function ScanLine:Pointer; overload;

Returns the pointer to the first pixel. All pixels are written from top-left to bottom-right. The pixels are stored a TRGBARec.

Public function Loaded:boolean;

Returns wether memory for the bitmap is reserved.

Properties

Public property Pixels[X, Y:integer]: TAndorraColor read GetPixel write SetPixel;

Use the pixels property to gain easy access to each pixel of the bitmap.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:58