FGX.Canvas.Types.TfgPath: различия между версиями
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 22: | Строка 22: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddCommand(const ACommand: [[TfgPathCommand|TfgPathCommand]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
+ | <span style="color:gray">Описание отсутствует.</span> | ||
|- | |- | ||
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveTo(const APoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MoveTo(const APoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
Строка 71: | Строка 74: | ||
<span style="color:gray">Описание отсутствует.</span> | <span style="color:gray">Описание отсутствует.</span> | ||
|- | |- | ||
− | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurve(const | + | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurve(const AControlPoint: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> |
<p>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.</p> | <p>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.</p> | ||
|- | |- | ||
− | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurveRel(const | + | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddQuadraticCurveRel(const AControlPoint: [[TPointF]]; const AEndPoint: [[TPointF]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> |
<p>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.</p> | <p>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.</p> | ||
|- | |- | ||
Строка 84: | Строка 87: | ||
|- | |- | ||
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddArc(const ARect: [[TRectF]]; const AStartAngle: [[Single]]; const ASweepAngle: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddArc(const ARect: [[TRectF]]; const AStartAngle: [[Single]]; const ASweepAngle: [[Single]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
− | + | <p>Добавляет дугу эллипса, вписанного в область <i>ARect</i> . Начало дуги задается углом <i>AStartAngle</i> в градусах. Конец дуги задается дельтой <i>ASweepAngle</i> в градусах, которая прибавляется к <i>AStartAngle</i> .</p> | |
− | <p>Добавляет дугу эллипса, вписанного в область <i>ARect</i> . Начало дуги задается углом <i>AStartAngle</i> в градусах. Конец дуги задается дельтой <i>ASweepAngle</i> в градусах, которая прибавляется к <i>AStartAngle</i> .</p | ||
|- | |- | ||
| <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">AddPath(const APath: [[FGX.Canvas.Types.TfgPath|TfgPath]]): [[FGX.Canvas.Types.TfgPath|TfgPath]]</code> | ||
Строка 110: | Строка 112: | ||
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LastPoint(): [[TPointF]]</code> | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LastPoint(): [[TPointF]]</code> | ||
<p>Возвращает последнюю точку в пути. Если ни одной точки нет, то вернет (0, 0).</p> | <p>Возвращает последнюю точку в пути. Если ни одной точки нет, то вернет (0, 0).</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">FirstCommand(): [[TfgPathCommand|TfgPathCommand]]</code> | ||
+ | <p>Возвращает первую комманду в пути. Если ни одной команды нет, то вернет пустую команду.</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LastCommand(): [[TfgPathCommand|TfgPathCommand]]</code> | ||
+ | <p>Возвращает последнюю комманду в пути. Если ни одной команды нет, то вернет команду.</p> | ||
|- | |- | ||
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ToString(): [[string]]</code> | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ToString(): [[string]]</code> | ||
+ | <span style="color:gray">Описание отсутствует.</span> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">GetEnumerator(): [[TEnumerator<FGX.Canvas.Types.TfgPathCommand>]]</code> | ||
<span style="color:gray">Описание отсутствует.</span> | <span style="color:gray">Описание отсутствует.</span> | ||
|} | |} | ||
Строка 118: | Строка 129: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>IsEmpty: [[Boolean]]</code> | ||
+ | <span style="color:gray">Описание отсутствует.</span> | ||
|- | |- | ||
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Count: [[Integer]]</code> | | <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Count: [[Integer]]</code> | ||
<span style="color:gray">Описание отсутствует.</span> | <span style="color:gray">Описание отсутствует.</span> | ||
|- | |- | ||
− | | <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code> | + | | <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Commands[AIndex]: [[TfgPathCommand|TfgPathCommand]]</code> |
<span style="color:gray">Описание отсутствует.</span> | <span style="color:gray">Описание отсутствует.</span> | ||
|} | |} |
Текущая версия на 00:16, 9 ноября 2020
Delphi
TfgPath = class (TfgPersistent)
TPersistent -> TfgPersistent -> TfgPath
Содержание
Описание
Описание отсутствует.
Конструкторы
constructor
|
Create(AOwner: TPersistent)
Описание отсутствует. |
Методы
function
|
AddCommand(const ACommand: TfgPathCommand): TfgPath
Описание отсутствует. |
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 AControlPoint: 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 AControlPoint: 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
|
FirstCommand(): TfgPathCommand
Возвращает первую комманду в пути. Если ни одной команды нет, то вернет пустую команду. |
function
|
LastCommand(): TfgPathCommand
Возвращает последнюю комманду в пути. Если ни одной команды нет, то вернет команду. |
function
|
ToString(): string
Описание отсутствует. |
function
|
GetEnumerator(): [[TEnumerator<FGX.Canvas.Types.TfgPathCommand>]]
Описание отсутствует. |
Свойства
property
|
IsEmpty: Boolean
Описание отсутствует. |
property
|
Count: Integer
Описание отсутствует. |
property
|
Commands[AIndex]: TfgPathCommand
Описание отсутствует. |