Show: Delphi C++
Display Preferences

FMX.Graphics.TPathData.SmoothCurveToRel

From RAD Studio API Documentation
Jump to: navigation, search

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

FMXTypesTPathDataInitialPath.PNG

FMXTypesTPathDataSmoothCurveTo.PNG

FMXTypesTPathDataSmoothCurveToRel.PNG

See Also

Personal tools
In Other Languages
Previous Versions
Assistance