FMX.Graphics.TPathData.CurveToRel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

void __fastcall CurveToRel(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 that depend on the end point of the current TPathData.

The start point of the curve is the end point of the TPathData.

The ControlPoint1 and ControlPoint2 parameters' coordinates specify the distances to the end point of the current TPathData, on each axis, for each of the two control points of the curve.

The EndPoint parameter's coordinates specify the distances to the end point of the current TPathData, on each axis, for the end point of the curve.

CurveToRel adds the two control points and the end point of the curve to the Points array. The coordinates for each added point are equal to the sum between the coordinates of the last point and the coordinates of the corresponding point 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 CurveToRel.

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

To see the difference between the results of CurveTo and CurveToRel, 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