FMX.Graphics.TPathData.CurveTo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CurveTo(const ControlPoint1, ControlPoint2, EndPoint: TPointF);

C++

void __fastcall CurveTo(const System::Types::TPointF &ControlPoint1, 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 curve to the current TPathData.

The curve is defined by 4 points:

  • A start point--the last point of the TPathData.
  • Two control points, specified by the ControlPoint1 and ControlPoint2 parameters.
  • An end point, specified by the EndPoint parameter.

CurveTo adds ControlPoint1, ControlPoint2, and EndPoint 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 CurveTo.

To find the end point of the TPathData, call the LastPoint method.

To see the difference between CurveTo and CurveToRel results, see the following table.

The parameter points used in the example are:

  • For ControlPoint1--CP1(a,b)
  • For ControlPoint2--CP2(c,d)
  • For EndPoint--EP(e,f)
Initial Path CurveTo(CP1,CP2,EP) Result CurveToRel(CP1,CP2,EP) Result

FMXTypesTPathDataInitialPath.PNG

FMXTypesTPathDataCurveTo.PNG

FMXTypesTPathDataCurveToRel.PNG

See Also