Class TBGRAAffineBitmapTransform
Unit
Declaration
type TBGRAAffineBitmapTransform = class(TBGRAAffineScannerTransform)
Description
Scanners that applies an affine transform to a bitmap.
It is usedful if you don't want the bitmap to repeats itself, or want to specify the resample filter, or want to fit easily the bitmap on axes.
Example filling with a rotated image:
uses BGRABitmap, BGRABitmapTypes, BGRATransform; procedure TForm1.PaintImage; var image: TBGRABitmap; tex: TBGRABitmap; affine: TBGRAAffineBitmapTransform; begin //black background image := TBGRABitmap.Create(ClientWidth,ClientHeight, BGRABlack ); tex:= TBGRABitmap.Create('image.png'); //load a bitmap //create a rotation of 45° affine := TBGRAAffineBitmapTransform.Create(tex,True); affine.RotateDeg(45); //use this transformation as parameter instead of tex image.FillPolyAntialias( [PointF(110,10), PointF(250,10), PointF(350,160), PointF(10,160)], affine); affine.Free; tex.Free; image.Draw(Canvas,0,0,True); //draw on the screen image.free; end;
Hierarchy
- IInterface
- IBGRAScanner
- TBGRACustomScanner
- TBGRAAffineScannerTransform
- TBGRAAffineBitmapTransform
Overview
Fields
FBitmap: TBGRACustomBitmap; |
|
FBuffer: PBGRAPixel; |
|
FBufferSize: Int32or64; |
|
FIncludeEdges: boolean; |
|
FRepeatImageX: boolean; |
|
FRepeatImageY: boolean; |
|
FResampleFilter: TResampleFilter; |
Methods
constructor Create(ABitmap: TBGRACustomBitmap; ARepeatImageX: Boolean; ARepeatImageY: Boolean; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); overload; |
|
constructor Create(ABitmap: TBGRACustomBitmap; ARepeatImage: Boolean= false; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); overload; |
|
destructor Destroy; override; |
|
function InternalScanCurrentPixel: TBGRAPixel; override; |
|
function IsScanPutPixelsDefined: boolean; override; |
|
procedure Fit(Origin, HAxis, VAxis: TPointF); override; |
|
procedure ScanPutPixels(pdest: PBGRAPixel; count: integer; mode: TDrawMode); override; |
|
procedure Init(ABitmap: TBGRACustomBitmap; ARepeatImageX: Boolean= false; ARepeatImageY: Boolean= false; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); |
Description
Fields
FBitmap: TBGRACustomBitmap; |
|
This item has no description. |
FBuffer: PBGRAPixel; |
|
This item has no description. |
FBufferSize: Int32or64; |
|
This item has no description. |
FIncludeEdges: boolean; |
|
This item has no description. |
FRepeatImageX: boolean; |
|
This item has no description. |
FRepeatImageY: boolean; |
|
This item has no description. |
FResampleFilter: TResampleFilter; |
|
This item has no description. |
Methods
constructor Create(ABitmap: TBGRACustomBitmap; ARepeatImageX: Boolean; ARepeatImageY: Boolean; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); overload; |
|
This item has no description. |
constructor Create(ABitmap: TBGRACustomBitmap; ARepeatImage: Boolean= false; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); overload; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
function InternalScanCurrentPixel: TBGRAPixel; override; |
|
This item has no description. |
function IsScanPutPixelsDefined: boolean; override; |
|
This item has no description. |
procedure Fit(Origin, HAxis, VAxis: TPointF); override; |
|
This item has no description. |
procedure ScanPutPixels(pdest: PBGRAPixel; count: integer; mode: TDrawMode); override; |
|
This item has no description. |
procedure Init(ABitmap: TBGRACustomBitmap; ARepeatImageX: Boolean= false; ARepeatImageY: Boolean= false; AResampleFilter: TResampleFilter = rfLinear; AIncludeEdges: boolean = false); |
|
This item has no description. |