FMX.Graphics.TPathData.SmoothCurveToRel
Delphi
procedure SmoothCurveToRel(const ControlPoint2, EndPoint: TPointF);
C++
void __fastcall SmoothCurveToRel(const System::Types::TPointF &ControlPoint2, const System::Types::TPointF &EndPoint);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TPathData |
Description
Appends a smooth curve to the current TPathData.
The smooth curve is defined by 4 points that depend on the last point of the current TPathData.
The start point of the curve is the end point of the TPathData.
If Points has more than 2 items, the first control point coincides with the start point, otherwise it is equal to the second control point.
The ControlPoint2
parameter's coordinates specify the distances to the last point of the current TPathData, on each axis, for the second control point of the curve.
The EndPoint
parameter's coordinates specify the distances to the last point of the current TPathData, on each axis, for the end point of the curve.
SmoothCurveToRel adds the control points and the end point of the curve to the Points array. The coordinates for each point are equal to the sum between the coordinates of the last point of the current TPathData and the coordinates of the corresponding points specified by the parameters. The added points are of type CurveTo.
To move the start point of the curve, call the MoveTo or MoveToRel method before calling SmoothCurveToRel.
To find the last point of the TPathData, call the LastPoint method.
To see the difference between the results of SmoothCurveTo and SmoothCurveToRel, see the following table.
The parameter points used in the example are:
- For
ControlPoint2
--CP2(a,b) - For
EndPoint
--EP(c,d)
Initial Path | CurveTo(CP2,EP) Result | CurveToRel(CP2,EP) Result |
---|---|---|
See Also
- FMX.Graphics.TPathData.Points
- FMX.Graphics.TPathPointKind
- FMX.Graphics.TPathData.ClosePath
- FMX.Graphics.TPathData.CurveTo
- FMX.Graphics.TPathData.CurveToRel
- FMX.Graphics.TPathData.HLineTo
- FMX.Graphics.TPathData.HLineToRel
- FMX.Graphics.TPathData.LineTo
- FMX.Graphics.TPathData.LineToRel
- FMX.Graphics.TPathData.LastPoint
- FMX.Graphics.TPathData.MoveTo
- FMX.Graphics.TPathData.MoveToRel
- FMX.Graphics.TPathData.SmoothCurveTo
- FMX.Graphics.TPathData.VLineTo
- FMX.Graphics.TPathData.VLineToRel