Class TBGRATwirlScanner
Unit
Declaration
type TBGRATwirlScanner = class(TBGRACustomScanner)
Description
Scanner that applies a twirl transformation.
Note : this scanner handles integer coordinates only, so any further transformation applied after this one may not render correctly.
Example drawing a radial gradient transformed with a twirl:
var image: TBGRABitmap; grad: TBGRAGradientScanner; affine: TBGRAAffineScannerTransform; twirl: TBGRATwirlScanner; 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); twirl := TBGRATwirlScanner.Create(affine,Point(ClientWidth div 2, ClientHeight div 2),100); image.Fill(twirl); twirl.Free; affine.free; grad.free; image.Draw(Canvas,0,0,True); image.free; end;
Hierarchy
- IInterface
- IBGRAScanner
- TBGRACustomScanner
- TBGRATwirlScanner
Overview
Fields
FCenter: TPoint; |
|
FExponent: Single; |
|
FRadius: Single; |
|
FScanAtFunc: TScanAtFunction; |
|
FScanner: IBGRAScanner; |
|
FTurn: Single; |
Methods
constructor Create(AScanner: IBGRAScanner; ACenter: TPoint; ARadius: single; ATurn: single = 1; AExponent: single = 3); |
|
function ScanAt(X, Y: Single): TBGRAPixel; override; |
Properties
property Center: TPoint read FCenter; |
|
property Exponent: Single read FExponent; |
|
property Radius: Single read FRadius; |
Description
Fields
FCenter: TPoint; |
|
This item has no description. |
FExponent: Single; |
|
This item has no description. |
FRadius: Single; |
|
This item has no description. |
FScanAtFunc: TScanAtFunction; |
|
This item has no description. |
FScanner: IBGRAScanner; |
|
This item has no description. |
FTurn: Single; |
|
This item has no description. |
Methods
constructor Create(AScanner: IBGRAScanner; ACenter: TPoint; ARadius: single; ATurn: single = 1; AExponent: single = 3); |
|
This item has no description. |
function ScanAt(X, Y: Single): TBGRAPixel; override; |
|
This item has no description. |
Properties
property Center: TPoint read FCenter; |
|
This item has no description. |
property Exponent: Single read FExponent; |
|
This item has no description. |
property Radius: Single read FRadius; |
|
This item has no description. |