CurveTo Class Documentation

classCurveTo : Segment

Namespace:datalogics_interface

Inherits from:
Segment

Detailed Description

The curved segment is appended to a path.

The curveto operator calculates the curve between two endpoints, the current (beginning) point and the final (end) point, and in relation to two matching control points.

The control points define the nature of the curve between the two endpoints. These values are represented by a series of x and y coordinates.

Uses types

Constructor & Destructor Documentation

CurveTo

Parameters

p1: const Point &

the first control point.

p2: const Point &

the second control point.

p3: const Point &

the new current point.

Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point2 as the Bézier control points. The new current point is point3.

CurveTo

CurveTo(doublex1, doubley1, doublex2, doubley2, doublex3, doubley3)

Parameters

x1: double

the first control point.

y1: double

the second control point.

x2: double

the new current point.

y2: double
x3: double
y3: double

Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point2 as the Bézier control points. The new current point is point3.

~CurveTo

~CurveTo()

Member Function Documentation

point1

Pointpoint1()

Returns:

The first off-curve control point.

point2

Pointpoint2()

Returns:

The second off-curve control point.

point3

Pointpoint3()

Returns:

The end point of the curve.

to_string

std::stringto_string()

Returns:

std::string

Represents a segment, or a single line, within a path.