Reference TImageBitmap
Declared in Codebot.Graphics.Windows.ImageBitmap.pas on line 109
TImageBitmap is a 32 bit alpha blended graphic which loads and saves images using the Windows imaging component
TImageBitmap = class(TGraphic)
protected
procedure AssignTo(Dest: TPersistent); override;
procedure HandleNeeded(AllowChange: Boolean = True);
procedure DestroyHandle;
procedure Draw(ACanvas: TCanvas; const Rect: TRect); override;
function GetCanvas: TCanvas; virtual;
function GetEmpty: Boolean; override;
function GetTransparent: Boolean; override;
procedure SetTransparent(Value: Boolean); override;
function GetHeight: Integer; override;
function GetWidth: Integer; override;
procedure SetHeight(Value: Integer); override;
procedure SetWidth(Value: Integer); override;
public
constructor Create; override; overload;
constructor Create(Bitmap: TFastBitmap); overload;
destructor Destroy; override;
procedure RequestBitmap(out Bitmap: TFastBitmap; Acquire: Boolean = False);
procedure Assign(Source: TPersistent); override;
procedure Blit(DC: HDC; const Rect: TRect; Opacity: Byte = $FF); overload;
procedure Blit(DC: HDC; X, Y, Index: Integer; Opacity: Byte = $FF); overload;
procedure Blit(DC: HDC; const Rect: TRect; const Borders: TRect; Opacity: Byte = $FF); overload;
procedure Resize(AWidth, AHeight: Integer); overload;
procedure Resize(Percent: Single); overload;
procedure Load(Stream: TStream; const AFormat: TImageBitmapFormat);
procedure Save(Stream: TStream; const AFormat: TImageBitmapFormat);
procedure LoadFromStream(Stream: TStream); override;
procedure SaveToStream(Stream: TStream); override;
procedure LoadFromFile(const Filename: string); override;
procedure SaveToFile(const Filename: string); override;
property Format: TImageBitmapFormat read FFormat write SetImageBitmapFormat;
property Bitmap: TFastBitmap read GetBitmap;
property Bits: Pointer read GetBits;
property Canvas: TCanvas read GetCanvas;
property Bounds: TRect read GetBounds;
property Opacity: Byte read FOpacity write FOpacity;
property Handle: THandle read GetHandle;
property PixelDepth: TPixelDepth read FPixelDepth write SetPixelDepth;
property ScaleX: Single read FScaleX write FScaleX;
property ScaleY: Single read FScaleY write FScaleY;
property Scanline[Row: Integer]: Pointer read GetScanLine;
property Stride: Integer read FStride;
property Size: Integer read GetSize;
end;