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

◆ draw_curve() [6/8]

void xtd::drawing::graphics::draw_curve ( const pen pen,
const std::vector< xtd::drawing::point_f > &  points,
size_t  offset,
size_t  number_of_segments 
)

Draws a cardinal spline through a specified array of xtd::drawing::point_f structures. The drawing begins offset from the beginning of the array.

Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point_f structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point_f structures for curve to be drawn.
The value of the offset parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
The value of the number_of_segments parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the number_of_segments parameter must be at least 1. The value of the offset parameter plus the value of the number_of_segments parameter must be less than the number of elements in the array of the points parameter.
This method uses a default tension of 0.0.