FGX.Canvas.Types.TfgPath: различия между версиями
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 14: | Строка 14: | ||
|- | |- | ||
| <syntaxhighlight lang="Delphi">constructor</syntaxhighlight> || <code>Create(AOwner: [[TPersistent]])</code> | | <syntaxhighlight lang="Delphi">constructor</syntaxhighlight> || <code>Create(AOwner: [[TPersistent]])</code> | ||
+ | |||
+ | |} | ||
+ | |||
+ | == Методы == | ||
+ | |||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveTo(const APoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Start a new sub-path at the given (x,y) coordinate. Absolute coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. In this case, subsequent pairs of coordinates are treated as relative even though the initial moveto is interpreted as an absolute moveto. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveTo(const AX: [[Single]]; const AY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveToRel(const AVector: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Start a new sub-path at the given (x,y) coordinate. Relative coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. In this case, subsequent pairs of coordinates are treated as relative even though the initial moveto is interpreted as an absolute moveto. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveToRel(const ADX: [[Single]]; const ADY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LineTo(const APoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LineTo(const AX: [[Single]]; const AY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LineToRel(const AVector: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LineToRel(const ADX: [[Single]]; const ADY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HLineTo(const AX: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HLineToRel(const AX: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">VLineTo(const AY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">VLineToRel(const AY: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddCurve(const AControlPoint1: [[TPointF]]; const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddCurveRel(const AControlPoint1: [[TPointF]]; const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddSmoothCurve(const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddSmoothCurveRel(const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurve(const AControlPoint1: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Draws a quadratic Bézier curve from the current point to (x,y) using (x1,y1) as the control point. Absolute coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurveRel(const AControlPoint1: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Draws a quadratic Bézier curve from the current point to (x,y) using (x1,y1) as the control point. Relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddSmoothQuadraticCurve(const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Draws a quadratic Bézier curve from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a Q, q, T or t, assume the control point is coincident with the current point.) Absolute coordinates will follow; At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddSmoothQuadraticCurveRel(const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Draws a quadratic Bézier curve from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a Q, q, T or t, assume the control point is coincident with the current point.) Relative coordinates will follow; At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddArc(const ARect: [[TRectF]]; const AStartAngle: [[Single]]; const ASweepAngle: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | Добавляет дугу эллипса, вписанного в область '' ARect '' . Начало дуги задается углом '' AStartAngle '' в градусах. Конец дуги задается дельтой '' ASweepAngle '' в градусах, которая прибавляется к '' AStartAngle '' . | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddPath(const APath: [[FGX.Canvas.Types.TfgPath|TfgPath]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ClosePath(): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Clear()</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">FitInto(const ANewBounds: [[TRectF]])</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Translate(const AOffset: [[TPointF]])</code> | ||
+ | |||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CalculateFrame(): [[TRectF]]</code> | ||
+ | Вычисляет выпуклую оболочку расположения всего пути в локальных координатах пути. | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">FirstPoint(): [[TPointF]]</code> | ||
+ | Возвращает первую точку в пути. Если ни одной точки нет, то вернет (0, 0). | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LastPoint(): [[TPointF]]</code> | ||
+ | Возвращает последнюю точку в пути. Если ни одной точки нет, то вернет (0, 0). | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ToString(): [[string]]</code> | ||
|} | |} |
Версия 04:29, 10 июня 2019
Delphi
TfgPath = class (TfgPersistent)
Описание
Описание отсутствует.
Конструкторы
constructor
|
Create(AOwner: TPersistent)
|
Методы
function
|
MoveTo(const APoint: TPointF): TfgPath
Start a new sub-path at the given (x,y) coordinate. Absolute coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. In this case, subsequent pairs of coordinates are treated as relative even though the initial moveto is interpreted as an absolute moveto. |
function
|
MoveTo(const AX: Single; const AY: Single): TfgPath
|
function
|
MoveToRel(const AVector: TPointF): TfgPath
Start a new sub-path at the given (x,y) coordinate. Relative coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. In this case, subsequent pairs of coordinates are treated as relative even though the initial moveto is interpreted as an absolute moveto. |
function
|
MoveToRel(const ADX: Single; const ADY: Single): TfgPath
|
function
|
LineTo(const APoint: TPointF): TfgPath
|
function
|
LineTo(const AX: Single; const AY: Single): TfgPath
|
function
|
LineToRel(const AVector: TPointF): TfgPath
|
function
|
LineToRel(const ADX: Single; const ADY: Single): TfgPath
|
function
|
HLineTo(const AX: Single): TfgPath
|
function
|
HLineToRel(const AX: Single): TfgPath
|
function
|
VLineTo(const AY: Single): TfgPath
|
function
|
VLineToRel(const AY: Single): TfgPath
|
function
|
AddCurve(const AControlPoint1: TPointF; const AControlPoint2: TPointF; const AEndPoint: TPointF): TfgPath
|
function
|
AddCurveRel(const AControlPoint1: TPointF; const AControlPoint2: TPointF; const AEndPoint: TPointF): TfgPath
|
function
|
AddSmoothCurve(const AControlPoint2: TPointF; const AEndPoint: TPointF): TfgPath
|
function
|
AddSmoothCurveRel(const AControlPoint2: TPointF; const AEndPoint: TPointF): TfgPath
|
function
|
AddQuadraticCurve(const AControlPoint1: TPointF; const AEndPoint: TPointF): TfgPath
Draws a quadratic Bézier curve from the current point to (x,y) using (x1,y1) as the control point. Absolute coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. |
function
|
AddQuadraticCurveRel(const AControlPoint1: TPointF; const AEndPoint: TPointF): TfgPath
Draws a quadratic Bézier curve from the current point to (x,y) using (x1,y1) as the control point. Relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. |
function
|
AddSmoothQuadraticCurve(const AEndPoint: TPointF): TfgPath
Draws a quadratic Bézier curve from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a Q, q, T or t, assume the control point is coincident with the current point.) Absolute coordinates will follow; At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. |
function
|
AddSmoothQuadraticCurveRel(const AEndPoint: TPointF): TfgPath
Draws a quadratic Bézier curve from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a Q, q, T or t, assume the control point is coincident with the current point.) Relative coordinates will follow; At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier. |
function
|
AddArc(const ARect: TRectF; const AStartAngle: Single; const ASweepAngle: Single): TfgPath
Добавляет дугу эллипса, вписанного в область ARect . Начало дуги задается углом AStartAngle в градусах. Конец дуги задается дельтой ASweepAngle в градусах, которая прибавляется к AStartAngle . |
function
|
AddPath(const APath: TfgPath): TfgPath
|
function
|
ClosePath(): TfgPath
|
procedure
|
Clear()
|
procedure
|
FitInto(const ANewBounds: TRectF)
|
procedure
|
Translate(const AOffset: TPointF)
|
function
|
CalculateFrame(): TRectF
Вычисляет выпуклую оболочку расположения всего пути в локальных координатах пути. |
function
|
FirstPoint(): TPointF
Возвращает первую точку в пути. Если ни одной точки нет, то вернет (0, 0). |
function
|
LastPoint(): TPointF
Возвращает последнюю точку в пути. Если ни одной точки нет, то вернет (0, 0). |
function
|
ToString(): string
|