Class TBGRACustomPenStroker
Unit
Declaration
type TBGRACustomPenStroker = class(TObject)
Description
Generic class representing a pen stroker, used for drawing and styling lines with various attributes
Hierarchy
- TObject
- TBGRACustomPenStroker
Overview
Methods
![]() |
function ComputePolygon(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; |
![]() |
function ComputePolyline(const APoints: array of TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; |
![]() |
function ComputePolyline(const APoints: array of TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; |
![]() |
function ComputePolylineAutoCycle(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; |
![]() |
function GetArrow: TBGRACustomArrow; virtual; abstract; |
![]() |
function GetArrowOwned: boolean; virtual; abstract; |
![]() |
function GetCustomPenStyle: TBGRAPenStyle; virtual; abstract; |
![]() |
function GetJoinStyle: TPenJoinStyle; virtual; abstract; |
![]() |
function GetLineCap: TPenEndCap; virtual; abstract; |
![]() |
function GetMiterLimit: single; virtual; abstract; |
![]() |
function GetPenStyle: TPenStyle; virtual; abstract; |
![]() |
function GetStrokeMatrix: TAffineMatrix; virtual; abstract; |
![]() |
procedure SetArrow(AValue: TBGRACustomArrow); virtual; abstract; |
![]() |
procedure SetArrowOwned(AValue: boolean); virtual; abstract; |
![]() |
procedure SetCustomPenStyle(AValue: TBGRAPenStyle); virtual; abstract; |
![]() |
procedure SetJoinStyle(AValue: TPenJoinStyle); virtual; abstract; |
![]() |
procedure SetLineCap(AValue: TPenEndCap); virtual; abstract; |
![]() |
procedure SetMiterLimit(AValue: single); virtual; abstract; |
![]() |
procedure SetPenStyle(AValue: TPenStyle); virtual; abstract; |
![]() |
procedure SetStrokeMatrix(const AValue: TAffineMatrix); virtual; abstract; |
Properties
![]() |
property Arrow: TBGRACustomArrow read GetArrow write SetArrow; |
![]() |
property ArrowOwned: boolean read GetArrowOwned write SetArrowOwned; |
![]() |
property CustomPenStyle: TBGRAPenStyle read GetCustomPenStyle write SetCustomPenStyle; |
![]() |
property JoinStyle: TPenJoinStyle read GetJoinStyle write SetJoinStyle; |
![]() |
property LineCap: TPenEndCap read GetLineCap write SetLineCap; |
![]() |
property MiterLimit: single read GetMiterLimit write SetMiterLimit; |
![]() |
property StrokeMatrix: TAffineMatrix read GetStrokeMatrix write SetStrokeMatrix; |
![]() |
property Style: TPenStyle read GetPenStyle write SetPenStyle; |
Description
Methods
![]() |
function ComputePolygon(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; |
Computes a polygon with the given points and width |
![]() |
function ComputePolyline(const APoints: array of TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; |
Computes a polyline with the given points, width, and pen color, optionally closing the cap |
![]() |
function ComputePolyline(const APoints: array of TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; |
Computes a polyline with the given points and width, optionally closing the cap |
![]() |
function ComputePolylineAutoCycle(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; |
Computes a polyline with automatic cycling of points and given width |
![]() |
function GetArrow: TBGRACustomArrow; virtual; abstract; |
![]() |
function GetArrowOwned: boolean; virtual; abstract; |
Determines if the arrow is owned (managed) by the pen stroker |
![]() |
function GetCustomPenStyle: TBGRAPenStyle; virtual; abstract; |
Gets the custom pen style |
![]() |
function GetJoinStyle: TPenJoinStyle; virtual; abstract; |
Retrieves the style of line joins (e.g., bevel, miter) |
![]() |
function GetLineCap: TPenEndCap; virtual; abstract; |
Retrieves the line cap style (e.g., butt, round) |
![]() |
function GetMiterLimit: single; virtual; abstract; |
Gets the miter limit for line joins |
![]() |
function GetPenStyle: TPenStyle; virtual; abstract; |
Retrieves the standard pen style |
![]() |
function GetStrokeMatrix: TAffineMatrix; virtual; abstract; |
Gets the stroke transformation matrix (applied only to stroke and not to path points) |
![]() |
procedure SetArrow(AValue: TBGRACustomArrow); virtual; abstract; |
![]() |
procedure SetArrowOwned(AValue: boolean); virtual; abstract; |
Sets whether the arrow is owned by the pen stroker |
![]() |
procedure SetCustomPenStyle(AValue: TBGRAPenStyle); virtual; abstract; |
Sets the custom pen style |
![]() |
procedure SetJoinStyle(AValue: TPenJoinStyle); virtual; abstract; |
Sets the style of line joins |
![]() |
procedure SetLineCap(AValue: TPenEndCap); virtual; abstract; |
Sets the line cap style |
![]() |
procedure SetMiterLimit(AValue: single); virtual; abstract; |
Sets the miter limit for line joins |
![]() |
procedure SetPenStyle(AValue: TPenStyle); virtual; abstract; |
Sets the standard pen style |
![]() |
procedure SetStrokeMatrix(const AValue: TAffineMatrix); virtual; abstract; |
Sets the stroke transformation matrix (applied only to stroke and not to path points) |
Properties
![]() |
property Arrow: TBGRACustomArrow read GetArrow write SetArrow; |
|
![]() |
property ArrowOwned: boolean read GetArrowOwned write SetArrowOwned; |
Is the arrow is owned by the pen stroker |
![]() |
property CustomPenStyle: TBGRAPenStyle read GetCustomPenStyle write SetCustomPenStyle; |
Custom pen style (with given dash and gap lengths) |
![]() |
property JoinStyle: TPenJoinStyle read GetJoinStyle write SetJoinStyle; |
Join style of lines |
![]() |
property LineCap: TPenEndCap read GetLineCap write SetLineCap; |
Line cap style |
![]() |
property MiterLimit: single read GetMiterLimit write SetMiterLimit; |
Miter limit for line joins |
![]() |
property StrokeMatrix: TAffineMatrix read GetStrokeMatrix write SetStrokeMatrix; |
Stroke transformation matrix.
This matrix is applied only to stroke and not to path points. Example of skew transform:
uses BGRABitmapTypes, BGRATransform; procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap); var i: Integer; begin for i := 0 to 5 do begin Bitmap.Pen.StrokeMatrix := AffineMatrixSkewXDeg(-10*i); Bitmap.Pen.LineCap := pecSquare; Bitmap.DrawLineAntialias(40,40+i*80,Bitmap.Width div 2-40,40+i*80, BGRABlack,30); Bitmap.Pen.LineCap := pecRound; Bitmap.DrawLineAntialias(Bitmap.Width div 2+40,40+i*80,Bitmap.Width-40,40+i*80, BGRABlack,30); end; end; |
![]() |
property Style: TPenStyle read GetPenStyle write SetPenStyle; |
Standard pen |