CurveTo Class Documentation
class CurveTo : SegmentNamespace:datalogics_interface
- Inherits from:
Segment
Detailed Description
The curveto operator is used to draw a Bezier curve.
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
CurveTo(const Point & p1, const Point & p2, const Point & p3)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(double x1, double y1, double x2, double y2, double x3, double y3)Parameters
x1: doublethe first control point.
y1: doublethe second control point.
x2: doublethe new current point.
y2: doublex3: doubley3: 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
Point point1()Returns:
PointThe first off-curve control point.
point2
Point point2()Returns:
PointThe second off-curve control point.
point3
Point point3()Returns:
PointThe end point of the curve.
to_string
std::string to_string()Returns:
std::stringRepresents a segment, or a single line, within a path.