Class TBGRAAffineScannerTransform
Unit
Declaration
type TBGRAAffineScannerTransform = class(TBGRACustomScanner)
Description
Scanner that transforms any other scanner. To use it, create this object with a scanner as parameter, call transformation procedures, and finally, use the newly created object as a scanner.
You can transform a gradient or a bitmap. See TBGRAAffineBitmapTransform for bitmap specific transformation.
Example drawing an oblique radial gradient:
uses BGRAGradientScanner, BGRATransform; procedure TForm1.FormPaint(Sender: TObject); var image: TBGRABitmap; grad: TBGRAGradientScanner; affine: TBGRAAffineScannerTransform; begin image := TBGRABitmap.Create(ClientWidth,ClientHeight, BGRABlack ); grad := TBGRAGradientScanner.Create(BGRA(0,0,255),BGRAWhite,gtRadial,PointF(0,0),PointF(1,0),True,True); affine := TBGRAAffineScannerTransform.Create(grad); affine.Scale(150,80); affine.RotateDeg(-30); affine.Translate(ClientWidth/2, ClientHeight/2); image.Fill(affine); affine.free; grad.free; image.Draw(Canvas,0,0,True); image.free; end;
Hierarchy
- IInterface
- IBGRAScanner
- TBGRACustomScanner
- TBGRAAffineScannerTransform
Overview
Fields
![]() |
FCur: TPointF; |
![]() |
FEmptyMatrix: Boolean; |
![]() |
FMatrix: TAffineMatrix; |
![]() |
FScanAtFunc: TScanAtFunction; |
![]() |
FScanner: IBGRAScanner; |
![]() |
GlobalOpacity: Byte; |
Methods
![]() |
constructor Create(AScanner: IBGRAScanner); |
![]() |
function GetScanCustomColorspace: TColorspaceAny; override; |
![]() |
function ScanAt(X, Y: Single): TBGRAPixel; override; |
![]() |
function ScanNextPixel: TBGRAPixel; override; |
![]() |
function GetViewMatrix: TAffineMatrix; |
![]() |
function InternalScanCurrentPixel: TBGRAPixel; virtual; |
![]() |
procedure Fit(Origin,HAxis,VAxis: TPointF); virtual; |
![]() |
procedure Invert; |
![]() |
procedure MultiplyBy(AMatrix: TAffineMatrix); |
![]() |
procedure Reset; |
![]() |
procedure RotateDeg(AngleCW: Single); |
![]() |
procedure RotateRad(AngleCCW: Single); |
![]() |
procedure Scale(factor: single); overload; |
![]() |
procedure Scale(sx,sy: single); overload; |
![]() |
procedure ScanMoveTo(X, Y: Integer); override; |
![]() |
procedure ScanMoveToF(X, Y: single); inline; |
![]() |
procedure ScanSkipPixels(ACount: integer); override; |
![]() |
procedure Translate(OfsX,OfsY: Single); |
![]() |
procedure SetMatrix(AMatrix: TAffineMatrix); |
![]() |
procedure SetViewMatrix(AValue: TAffineMatrix); |
Properties
![]() |
property Matrix: TAffineMatrix read FMatrix write SetMatrix; |
![]() |
property ViewMatrix: TAffineMatrix read GetViewMatrix write SetViewMatrix; |
Description
Fields
![]() |
FCur: TPointF; |
This item has no description. |
![]() |
FEmptyMatrix: Boolean; |
This item has no description. |
![]() |
FMatrix: TAffineMatrix; |
This item has no description. |
![]() |
FScanAtFunc: TScanAtFunction; |
This item has no description. |
![]() |
FScanner: IBGRAScanner; |
This item has no description. |
![]() |
GlobalOpacity: Byte; |
This item has no description. |
Methods
![]() |
constructor Create(AScanner: IBGRAScanner); |
This item has no description. |
![]() |
function GetScanCustomColorspace: TColorspaceAny; override; |
This item has no description. |
![]() |
function ScanAt(X, Y: Single): TBGRAPixel; override; |
This item has no description. |
![]() |
function ScanNextPixel: TBGRAPixel; override; |
This item has no description. |
![]() |
function GetViewMatrix: TAffineMatrix; |
This item has no description. |
![]() |
function InternalScanCurrentPixel: TBGRAPixel; virtual; |
This item has no description. |
![]() |
procedure Fit(Origin,HAxis,VAxis: TPointF); virtual; |
This item has no description. |
![]() |
procedure Invert; |
This item has no description. |
![]() |
procedure MultiplyBy(AMatrix: TAffineMatrix); |
This item has no description. |
![]() |
procedure Reset; |
This item has no description. |
![]() |
procedure RotateDeg(AngleCW: Single); |
This item has no description. |
![]() |
procedure RotateRad(AngleCCW: Single); |
This item has no description. |
![]() |
procedure Scale(factor: single); overload; |
This item has no description. |
![]() |
procedure Scale(sx,sy: single); overload; |
This item has no description. |
![]() |
procedure ScanMoveTo(X, Y: Integer); override; |
This item has no description. |
![]() |
procedure ScanMoveToF(X, Y: single); inline; |
This item has no description. |
![]() |
procedure ScanSkipPixels(ACount: integer); override; |
This item has no description. |
![]() |
procedure Translate(OfsX,OfsY: Single); |
This item has no description. |
![]() |
procedure SetMatrix(AMatrix: TAffineMatrix); |
This item has no description. |
![]() |
procedure SetViewMatrix(AValue: TAffineMatrix); |
This item has no description. |
Properties
![]() |
property Matrix: TAffineMatrix read FMatrix write SetMatrix; |
This item has no description. |
![]() |
property ViewMatrix: TAffineMatrix read GetViewMatrix write SetViewMatrix; |
This item has no description. |