xtd 0.2.0
Loading...
Searching...
No Matches

◆ draw_beziers() [1/2]

void xtd::drawing::graphics::draw_beziers ( const pen pen,
const std::vector< xtd::drawing::point > &  points 
)

Draws a series of Bézier splines from an array of xtd::drawing::point structures.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.
Remarks
The number of points in the array should be a multiple of 3 plus 1 because the first spline requires 4 points and any other splines require 3 points each. The first Bézier curve is drawn from the first point to the fourth point in the point array. The second and third points are control points that determine the shape of the curve. Each subsequent curve needs exactly three more points: two more control points and an ending point. The ending point of the previous curve is used as the starting point for each additional curve.