Class TVirtualBitmap (unit VBitmap)

Inherits from

TObject

Constructors


constructor Create ( AWidth, AHeight, ABits: Integer );

Public declarations

TVirtualBitmap


constructor CreateFromBitmap ( Bitmap: TBitmap );

FillChar(fContent.


Functions

destructor Destroy;

Recreate/resize the content stream

procedure Draw(x, y: Integer; Src: TVirtualBitmap);


function GetNearestColor(Color: Integer): Integer;


function GetPixel (x, y :Integer ): Integer;


procedure Line(x1, y1, x2, y2: Integer);


procedure LoadFromStream ( Stream: TStream );


procedure ProduceBitmap(Bitmap: TBitmap);


procedure Rectangle(x1, y1, x2, y2: Integer);


procedure SetPixel (x, y :Integer; Color: Integer );


procedure RecreateContent;

Protected declarations

function CheckTable: Boolean;

256 colors or less bitmap they use RGBQuad } {16bit colors or more bitmap they use RGBTriple

function GetColor(i: Byte): TColor;


procedure GotoXY(x, y: Integer);


procedure SetBits( Value: Integer );


procedure SetBrush(Val: TBrush);


procedure SetColor(i: Byte; Value: TColor );


procedure SetHeight( Value: Integer );


procedure SetPen(Val: TPen);


procedure SetWidth( Value: Integer );

Contain the whole bitmap

Bottom Right Pixel


procedure ValidXY(var x1, y1, x2, y2: Integer);

ensure the stream is started from beginning

Properties

property AntiAliase : Boolean


property Bits : Integer


property Brush : TBrush


property Colors : Integer


property ColorTable : TColor


property Content : TMemoryStream


property Height : Integer


property Pen : TPen


property Width : Integer


Events

Variables

ClrTableSize : Integer;

Only < 8bit bitmap can use color table

ColorSize : Single;


fAntialiased : Boolean;


fBits : Integer;

in another words they uses palette

fBrush : TBrush;

Private declarations

fColors : Integer;

Height of the bitmap

fColorTable : PColorTable;

Colors count

fContent : TMemoryStream;

Indicates the size of each color

fHeight : Integer;

Width of the bitmap

fPen : TPen;


fSkip : Integer;


fWidth : Integer;



Constructors


constructor Create ( AWidth, AHeight, ABits: Integer );

Public declarations

TVirtualBitmap


constructor CreateFromBitmap ( Bitmap: TBitmap );

FillChar(fContent.Memory, 0);


Functions


destructor Destroy;

Recreate/resize the content stream


procedure Draw(x, y: Integer; Src: TVirtualBitmap);


function GetNearestColor(Color: Integer): Integer;


function GetPixel (x, y :Integer ): Integer;


procedure Line(x1, y1, x2, y2: Integer);


procedure LoadFromStream ( Stream: TStream );


procedure ProduceBitmap(Bitmap: TBitmap);


procedure Rectangle(x1, y1, x2, y2: Integer);


procedure SetPixel (x, y :Integer; Color: Integer );


procedure RecreateContent;

Protected declarations


function CheckTable: Boolean;

256 colors or less bitmap they use RGBQuad } {16bit colors or more bitmap they use RGBTriple


function GetColor(i: Byte): TColor;


procedure GotoXY(x, y: Integer);


procedure SetBits( Value: Integer );


procedure SetBrush(Val: TBrush);


procedure SetColor(i: Byte; Value: TColor );


procedure SetHeight( Value: Integer );


procedure SetPen(Val: TPen);


procedure SetWidth( Value: Integer );

Contain the whole bitmap

Bottom Right Pixel


procedure ValidXY(var x1, y1, x2, y2: Integer);

ensure the stream is started from beginning


Properties


property AntiAliase : Boolean


property Bits : Integer


property Brush : TBrush


property Colors : Integer


property ColorTable : TColor


property Content : TMemoryStream


property Height : Integer


property Pen : TPen


property Width : Integer


Events


Variables


ClrTableSize : Integer;

Only < 8bit bitmap can use color table


ColorSize : Single;


fAntialiased : Boolean;


fBits : Integer;

in another words they uses palette


fBrush : TBrush;

Private declarations


fColors : Integer;

Height of the bitmap


fColorTable : PColorTable;

Colors count


fContent : TMemoryStream;

Indicates the size of each color


fHeight : Integer;

Width of the bitmap


fPen : TPen;


fSkip : Integer;


fWidth : Integer;