FGX.Canvas.Types.TfgPath: различия между версиями

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску
(summary)
(summary)
(Метка: замена)
Строка 3: Строка 3:
 
Delphi
 
Delphi
  
<code lang="Delphi">TfgPath = class (TfgPersistent)</code>
+
<syntaxhighlight lang="Delphi">TfgPath = class (TfgPersistent)</syntaxhighlight>
 
 
== Описание ==
 
 
 
Описание отсутствует.
 
 
 
== Конструкторы ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <code>constructor</code> || <code>Create(AOwner: [[TPersistent]])</code>
 
 
 
|}
 
 
 
== Методы ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">MoveTo(const APoint: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">MoveTo(const AX: [[Single]]; const AY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">MoveToRel(const AVector: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">MoveToRel(const ADX: [[Single]]; const ADY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">LineTo(const APoint: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">LineTo(const AX: [[Single]]; const AY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">LineToRel(const AVector: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">LineToRel(const ADX: [[Single]]; const ADY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">HLineTo(const AX: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">HLineToRel(const AX: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">VLineTo(const AY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">VLineToRel(const AY: [[Single]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddCurve(const AControlPoint1: [[TPointF]]; const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddCurveRel(const AControlPoint1: [[TPointF]]; const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddSmoothCurve(const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddSmoothCurveRel(const AControlPoint2: [[TPointF]]; const AEndPoint: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddQuadraticCurve(const AControlPoint1: [[TPointF]]; const AEndPoint: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddQuadraticCurveRel(const AControlPoint1: [[TPointF]]; const AEndPoint: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddSmoothQuadraticCurve(const AEndPoint: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddSmoothQuadraticCurveRel(const AEndPoint: [[TPointF]])</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.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddArc(const ARect: [[TRectF]]; const AStartAngle: [[Single]]; const ASweepAngle: [[Single]])</code>
 
Добавляет дугу эллипса, вписанного в область '' ARect '' . Начало дуги задается углом '' AStartAngle '' в градусах. Конец дуги задается дельтой '' ASweepAngle '' в градусах, которая прибавляется к '' AStartAngle '' .
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">AddPath(const APath: [[FGX.Canvas.Types.TfgPath|TfgPath]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">ClosePath()</code>
 
 
 
|-
 
| <code lang="Delphi">procedure</code> || <code lang="Delphi">Clear()</code>
 
 
 
|-
 
| <code lang="Delphi">procedure</code> || <code lang="Delphi">FitInto(const ANewBounds: [[TRectF]])</code>
 
 
 
|-
 
| <code lang="Delphi">procedure</code> || <code lang="Delphi">Translate(const AOffset: [[TPointF]])</code>
 
 
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">CalculateFrame()</code>
 
Вычисляет выпуклую оболочку расположения всего пути в локальных координатах пути.
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">FirstPoint()</code>
 
Возвращает первую точку в пути. Если ни одной точки нет, то вернет (0, 0).
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">LastPoint()</code>
 
Возвращает последнюю точку в пути. Если ни одной точки нет, то вернет (0, 0).
 
|-
 
| <code lang="Delphi">function</code> || <code lang="Delphi">ToString()</code>
 
 
 
|}
 
 
 
== Свойства ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <code>property</code> || <code>Count: [[Integer]]</code>
 
 
 
|-
 
| <code>property</code> || <code>Points[AIndex]: [[.TfgPathPoint|TfgPathPoint]]</code>
 
 
 
|}
 

Версия 04:26, 10 июня 2019

Delphi

TfgPath = class (TfgPersistent)