Interface IBGRAPath

Unit

Declaration

type IBGRAPath = interface(IInterface)

Description

Interface for path functions.

A path is the ability to define a contour with moveTo, lineTo...

Even if it is an interface, it must not implement reference counting.

Hierarchy

Overview

Methods

Public function getCursor: TBGRACustomPathCursor;
Public function getPoints: ArrayOfTPointF; overload;
Public function getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; overload;
Public procedure arc(constref arcDef: TArcDef);
Public procedure bezierCurveTo(constref cp1,cp2,pt: TPointF);
Public procedure closedSpline(const pts: array of TPointF; style: TSplineStyle);
Public procedure closePath;
Public procedure copyTo(dest: IBGRAPath);
Public procedure fill(AFillProc: TBGRAPathFillProc; AData: pointer); overload;
Public procedure fill(AFillProc: TBGRAPathFillProc; const AMatrix: TAffineMatrix; AData: pointer); overload;
Public procedure lineTo(constref pt: TPointF);
Public procedure moveTo(constref pt: TPointF);
Public procedure openedSpline(const pts: array of TPointF; style: TSplineStyle);
Public procedure polylineTo(const pts: array of TPointF);
Public procedure quadraticCurveTo(constref cp,pt: TPointF);
Public procedure stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); overload;
Public procedure stroke(ADrawProc: TBGRAPathDrawProc; const AMatrix: TAffineMatrix; AData: pointer); overload;

Description

Methods

Public function getCursor: TBGRACustomPathCursor;

Returns a cursor to go through the path. The cursor must be freed by calling Free.

Public function getPoints: ArrayOfTPointF; overload;

Returns the content of the path as an array of points

Public function getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; overload;

Returns the content of the path as an array of points with the transformation specified by AMatrix

Public procedure arc(constref arcDef: TArcDef);

Adds an arc. If there is a current point, it is connected to the beginning of the arc

Public procedure bezierCurveTo(constref cp1,cp2,pt: TPointF);

Adds a cubic Bézier curve from the current point

Public procedure closedSpline(const pts: array of TPointF; style: TSplineStyle);

Adds an closed spline. If there is a current point, it is connected to the beginning of the spline

Public procedure closePath;

Closes the current path with a line to the starting point

Public procedure copyTo(dest: IBGRAPath);

Copy the content of this path to the specified destination

Public procedure fill(AFillProc: TBGRAPathFillProc; AData: pointer); overload;

Calls a given fill procedure for each sub path with computed coordinates for rendering

Public procedure fill(AFillProc: TBGRAPathFillProc; const AMatrix: TAffineMatrix; AData: pointer); overload;

Calls a given fill procedure for each sub path with computed coordinates using given AMatrix transformation

Public procedure lineTo(constref pt: TPointF);

Adds a line from the current point

Public procedure moveTo(constref pt: TPointF);

Moves to a location, disconnected from previous points

Public procedure openedSpline(const pts: array of TPointF; style: TSplineStyle);

Adds an opened spline. If there is a current point, it is connected to the beginning of the spline

Public procedure polylineTo(const pts: array of TPointF);

Adds a polyline from the current point

Public procedure quadraticCurveTo(constref cp,pt: TPointF);

Adds a quadratic Bézier curve from the current point

Public procedure stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); overload;

Calls a given draw procedure for each sub path with computed coordinates for rendering

Public procedure stroke(ADrawProc: TBGRAPathDrawProc; const AMatrix: TAffineMatrix; AData: pointer); overload;

Calls a given draw procedure for each sub path with computed coordinates using given AMatrix transformation