FMX.Graphics.TPathData.SmoothCurveTo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SmoothCurveTo(const ControlPoint2, EndPoint: TPointF);

C++

void __fastcall SmoothCurveTo(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:

  • A start point--the last point of the TPathData.
  • Two control points. If Points has more than two items, the first control point coincides with the start point of the curve, otherwise it is equal to the second control point. The Control2 parameter specifies the second control point.
  • An end point, specified by the EndPoint parameter.

SmoothCurveTo adds the control points and the end point of the curve to the Points array. The added points are of type CurveTo.

To move the start point of the curve, call the MoveTo or MoveToRel method before calling SmoothCurveTo.

To find the end 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