xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::drawing_2d::graphics_path Class Referencefinal
Inheritance diagram for xtd::drawing::drawing_2d::graphics_path:
xtd::object xtd::iequatable< graphics_path >

Definition

Defines an object used to draw lines and curves. This class cannot be inherited.

class drawing_export_ graphics_path final : public object
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics_path.hpp:35
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
Inheritance
xtd::objectxtd::drawing::drawing_2d::graphics_path
Namespace
xtd::drawing::drawing_2d
Library
xtd.drawing
Examples
circular_form.cpp.

Public Constructors

 graphics_path ()
 Initializes a new instance of the xtd::drawing::drawing_2d::graphics_path class with a xtd::drawing::drawing_2d::graphics_path::fill_mode value of xtd::drawing::drawing_2d::fill_mode::alternate.
 
 graphics_path (xtd::drawing::drawing_2d::fill_mode mode)
 Initializes a new instance of the xtd::drawing::drawing_2d::graphics_path class with the specified xtd::drawing::drawing_2d::fil_mode enumeration.
 

Public Properties

intptr handle () const noexcept
 Gets the handle of the graphics path.
 
xtd::drawing::drawing_2d::fill_mode fill_mode () const noexcept
 Gets a xtd::drawing::drawing_2d::fill_mode enumeration that determines how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.
 
graphics_pathfill_mode (xtd::drawing::drawing_2d::fill_mode value) noexcept
 Sets a xtd::drawing::drawing_2d::fill_mode enumeration that determines how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.
 

Public Methods

void add_arc (const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
 Appends an elliptical arc to the current figure.
 
void add_arc (const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
 Appends an elliptical arc to the current figure.
 
void add_arc (int32 x, int32 y, int32 width, int32 height, float start_angle, float sweep_angle)
 Appends an elliptical arc to the current figure.
 
void add_arc (float x, float y, float width, float height, float start_angle, float sweep_angle)
 Appends an elliptical arc to the current figure.
 
void add_bezier (const xtd::drawing::point &pt1, const xtd::drawing::point &pt2, const xtd::drawing::point &pt3, const xtd::drawing::point &pt4)
 Adds a cubic Bézier curve to the current figure.
 
void add_bezier (const xtd::drawing::point_f &pt1, const xtd::drawing::point_f &pt2, const xtd::drawing::point_f &pt3, const xtd::drawing::point_f &pt4)
 Adds a cubic Bézier curve to the current figure.
 
void add_bezier (int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3, int32 x4, int32 y4)
 Adds a cubic Bézier curve to the current figure.
 
void add_bezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
 Adds a cubic Bézier curve to the current figure.
 
void add_beziers (const std::vector< xtd::drawing::point > &points)
 Adds a sequence of connected cubic Bézier curves to the current figure.
 
void add_beziers (const std::vector< xtd::drawing::point_f > &points)
 Adds a sequence of connected cubic Bézier curves to the current figure.
 
void add_closed_curve (const std::vector< xtd::drawing::point > &points)
 Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
 
void add_closed_curve (const std::vector< xtd::drawing::point_f > &points)
 Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
 
void add_closed_curve (const std::vector< xtd::drawing::point > &points, float tension)
 Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
 
void add_closed_curve (const std::vector< xtd::drawing::point_f > &points, float tension)
 Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
 
void add_curve (const std::vector< xtd::drawing::point > &points)
 Adds a spline curve to the current figure.
 
void add_curve (const std::vector< xtd::drawing::point_f > &points)
 Adds a spline curve to the current figure.
 
void add_curve (const std::vector< xtd::drawing::point > &points, float tension)
 Adds a spline curve to the current figure.
 
void add_curve (const std::vector< xtd::drawing::point_f > &points, float tension)
 Adds a spline curve to the current figure.
 
void add_curve (const std::vector< xtd::drawing::point > &points, size_t offset, size_t number_of_segments, float tension)
 Adds a spline curve to the current figure.
 
void add_curve (const std::vector< xtd::drawing::point_f > &points, size_t offset, size_t number_of_segments, float tension)
 Adds a spline curve to the current figure.
 
void add_ellipse (const xtd::drawing::rectangle &rect)
 Adds an ellipse to the current path.
 
void add_ellipse (const xtd::drawing::rectangle_f &rect)
 Adds an ellipse to the current path.
 
void add_ellipse (int32 x, int32 y, int32 width, int32 height)
 Adds an ellipse to the current path.
 
void add_ellipse (float x, float y, float width, float height)
 Adds an ellipse to the current path.
 
void add_line (const xtd::drawing::point &pt1, const xtd::drawing::point &pt2)
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
 
void add_line (const xtd::drawing::point_f &pt1, const xtd::drawing::point_f &pt2)
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
 
void add_line (int32 x1, int32 y1, int32 x2, int32 y2)
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
 
void add_line (float x1, float y1, float x2, float y2)
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
 
void add_lines (const std::vector< xtd::drawing::point > &points)
 Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.
 
void add_lines (const std::vector< xtd::drawing::point_f > &points)
 Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.
 
void add_path (const graphics_path &adding_path, bool connect)
 Appends the specified xtd::drawing::drawing_2d::graphics_path to this path.
 
void add_pie (const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
 Adds the outline of a pie shape to this path.
 
void add_pie (const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
 Adds the outline of a pie shape to this path.
 
void add_pie (int32 x, int32 y, int32 width, int32 height, float start_angle, float sweep_angle)
 Adds the outline of a pie shape to this path.
 
void add_pie (float x, float y, float width, float height, float start_angle, float sweep_angle)
 Adds the outline of a pie shape to this path.
 
void add_polygon (const std::vector< xtd::drawing::point > &points)
 Adds a polygon to this path.
 
void add_polygon (const std::vector< xtd::drawing::point_f > &points)
 Adds a polygon to this path.
 
void add_rectangle (const xtd::drawing::rectangle &rect)
 Adds a rectangle to this path.
 
void add_rectangle (const xtd::drawing::rectangle_f &rect)
 Adds a rectangle to this path.
 
void add_rectangle (int32 x, int32 y, int32 width, int32 height)
 Adds a rectangle to this path.
 
void add_rectangle (float x, float y, float width, float height)
 Adds a rectangle to this path.
 
void add_rectangles (const std::vector< xtd::drawing::rectangle > &rects)
 Adds a series of rectangles to this path.
 
void add_rectangles (const std::vector< xtd::drawing::rectangle_f > &rects)
 Adds a series of rectangles to this path.
 
void add_rounded_rectangle (const xtd::drawing::rectangle &rect, float radius)
 Adds a rounded rectangle to this path.
 
void add_rounded_rectangle (const xtd::drawing::rectangle_f &rect, float radius)
 Adds a rounded rectangle to this path.
 
void add_rounded_rectangle (int32 x, int32 y, int32 width, int32 height, float radius)
 Adds a rounded rectangle to this path.
 
void add_rounded_rectangle (float x, float y, float width, float height, float radius)
 Adds a rounded rectangle to this path.
 
void add_string (const xtd::string &s, const xtd::drawing::font_family &family, xtd::drawing::font_style style, float em_size, const xtd::drawing::point &origin, const xtd::drawing::string_format &format)
 Adds a text string to this path.
 
void add_string (const xtd::string &s, const xtd::drawing::font_family &family, xtd::drawing::font_style style, float em_size, const xtd::drawing::point_f &origin, const xtd::drawing::string_format &format)
 Adds a text string to this path.
 
void add_string (const xtd::string &s, const xtd::drawing::font_family &family, xtd::drawing::font_style style, float em_size, const xtd::drawing::rectangle &layout_rect, const xtd::drawing::string_format &format)
 Adds a text string to this path.
 
void add_string (const xtd::string &s, const xtd::drawing::font_family &family, xtd::drawing::font_style style, float em_size, const xtd::drawing::rectangle_f &layout_rect, const xtd::drawing::string_format &format)
 Adds a text string to this path.
 
void close_all_figures ()
 Closes all open figures in this path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.
 
void close_figure ()
 Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.
 
bool equals (const xtd::drawing::drawing_2d::graphics_path &value) const noexcept override
 
void flatten ()
 Converts each curve in this path into a sequence of connected line segments.
 
xtd::drawing::rectangle_f get_bounds () const
 Returns a rectangle that bounds this xtd::drawing::drawing_2d::graphics_path.
 
xtd::drawing::point_f get_lat_point () const
 Gets the last point of this xtd::drawing::drawing_2d::graphics_path.
 
bool is_vsible (const xtd::drawing::point &point) const
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
 
bool is_vsible (const xtd::drawing::point_f &point) const
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
 
bool is_vsible (int32 x, int32 y) const
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
 
bool is_vsible (float x, float y) const
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
 
void reset ()
 Empties the xtd::drawing::drawing_2d::graphics_path::path_points and xtd::drawing::drawing_2d::graphics_path::path_types arrays and sets the xtd::drawing::drawing_2d::graphics_path::fill_mode to xtd::drawing::drawing_2d::fill_mode::alternate.
 
void reverse ()
 Reverses the order of points in the xtd::drawing::drawing_2d::graphics_path::path_points array of this xtd::drawing::drawing_2d::graphics_path.
 
void start_figure ()
 Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
 
xtd::string to_string () const noexcept override
 Returns a xtd::string that represents the current object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ graphics_path() [1/2]

xtd::drawing::drawing_2d::graphics_path::graphics_path ( )

◆ graphics_path() [2/2]

xtd::drawing::drawing_2d::graphics_path::graphics_path ( xtd::drawing::drawing_2d::fill_mode  mode)
explicit

Initializes a new instance of the xtd::drawing::drawing_2d::graphics_path class with the specified xtd::drawing::drawing_2d::fil_mode enumeration.

Parameters
modeThe xtd::drawing::drawing_2d::fill_mode enumeration that determines how the interior of this xtd::drawing::drawing_2d::graphics_path is filled.

Member Function Documentation

◆ handle()

intptr xtd::drawing::drawing_2d::graphics_path::handle ( ) const
noexcept

Gets the handle of the graphics path.

Returns
An intptr that contains the handle of the graphics path.

◆ fill_mode() [1/2]

xtd::drawing::drawing_2d::fill_mode xtd::drawing::drawing_2d::graphics_path::fill_mode ( ) const
noexcept

Gets a xtd::drawing::drawing_2d::fill_mode enumeration that determines how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.

Returns
A xtd::drawing::drawing_2d::fill_mode enumeration that specifies how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.

◆ fill_mode() [2/2]

graphics_path & xtd::drawing::drawing_2d::graphics_path::fill_mode ( xtd::drawing::drawing_2d::fill_mode  value)
noexcept

Sets a xtd::drawing::drawing_2d::fill_mode enumeration that determines how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.

Parameters
valueA xtd::drawing::drawing_2d::fill_mode enumeration that specifies how the interiors of shapes in this xtd::drawing::drawing_2d::graphics_path are filled.

◆ add_arc() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_arc ( const xtd::drawing::rectangle rect,
float  start_angle,
float  sweep_angle 
)

Appends an elliptical arc to the current figure.

Parameters
rectA xtd::drawing::rectangle that represents the rectangular bounds of the ellipse from which the arc is taken.
start_angleThe starting angle of the arc, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the arc.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc.
The arc is traced along the perimeter of the ellipse bounded by the specified rectangle. The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle. The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle. If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

◆ add_arc() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_arc ( const xtd::drawing::rectangle_f rect,
float  start_angle,
float  sweep_angle 
)

Appends an elliptical arc to the current figure.

Parameters
rectA xtd::drawing::rectangle_f that represents the rectangular bounds of the ellipse from which the arc is taken.
start_angleThe starting angle of the arc, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the arc.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc.
The arc is traced along the perimeter of the ellipse bounded by the specified rectangle. The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle. The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle. If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

◆ add_arc() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_arc ( int32  x,
int32  y,
int32  width,
int32  height,
float  start_angle,
float  sweep_angle 
)

Appends an elliptical arc to the current figure.

Parameters
xThe x-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn.
yThe y-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn.
widthThe width of the rectangular region that defines the ellipse from which the arc is drawn.
heightThe height of the rectangular region that defines the ellipse from which the arc is drawn.
start_angleThe starting angle of the arc, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the arc.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc.
The arc is traced along the perimeter of the ellipse bounded by the specified rectangle. The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle. The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle. If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

◆ add_arc() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_arc ( float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)

Appends an elliptical arc to the current figure.

Parameters
xThe x-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn.
yThe y-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn.
widthThe width of the rectangular region that defines the ellipse from which the arc is drawn.
heightThe height of the rectangular region that defines the ellipse from which the arc is drawn.
start_angleThe starting angle of the arc, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the arc.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc.
The arc is traced along the perimeter of the ellipse bounded by the specified rectangle. The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle. The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle. If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

◆ add_bezier() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_bezier ( const xtd::drawing::point pt1,
const xtd::drawing::point pt2,
const xtd::drawing::point pt3,
const xtd::drawing::point pt4 
)

Adds a cubic Bézier curve to the current figure.

Parameters
pt1A xtd::drawing::point that represents the starting point of the curve.
pt2A xtd::drawing::point that represents the first control point for the curve.
pt3A xtd::drawing::point that represents the second control point for the curve.
pt4A xtd::drawing::point that represents the endpoint of the curve.
Remarks
The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points.
If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

◆ add_bezier() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_bezier ( const xtd::drawing::point_f pt1,
const xtd::drawing::point_f pt2,
const xtd::drawing::point_f pt3,
const xtd::drawing::point_f pt4 
)

Adds a cubic Bézier curve to the current figure.

Parameters
pt1A xtd::drawing::point_f that represents the starting point of the curve.
pt2A xtd::drawing::point_f that represents the first control point for the curve.
pt3A xtd::drawing::point_f that represents the second control point for the curve.
pt4A xtd::drawing::point_f that represents the endpoint of the curve.
Remarks
The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points.
If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

◆ add_bezier() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_bezier ( int32  x1,
int32  y1,
int32  x2,
int32  y2,
int32  x3,
int32  y3,
int32  x4,
int32  y4 
)

Adds a cubic Bézier curve to the current figure.

Parameters
x1The x-coordinate of the starting point of the curve.
y1The y-coordinate of the starting point of the curve.
x2The x-coordinate of the first control point for the curve.
y2The y-coordinate of the first control point for the curve.
x3The x-coordinate of the second control point for the curve.
y3The y-coordinate of the second control point for the curve.
x4The x-coordinate of the endpoint of the curve.
y4The y-coordinate of the endpoint of the curve.
Remarks
The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points.
If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

◆ add_bezier() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_bezier ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4 
)

Adds a cubic Bézier curve to the current figure.

Parameters
x1The x-coordinate of the starting point of the curve.
y1The y-coordinate of the starting point of the curve.
x2The x-coordinate of the first control point for the curve.
y2The y-coordinate of the first control point for the curve.
x3The x-coordinate of the second control point for the curve.
y3The y-coordinate of the second control point for the curve.
x4The x-coordinate of the endpoint of the curve.
y4The y-coordinate of the endpoint of the curve.
Remarks
The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points.
If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

◆ add_beziers() [1/2]

void xtd::drawing::drawing_2d::graphics_path::add_beziers ( const std::vector< xtd::drawing::point > &  points)

Adds a sequence of connected cubic Bézier curves to the current figure.

Parameters
pointsAn array of xtd::drawing::point structures that represents the points that define the curves.
Remarks
The points parameter specifies an array of endpoints and control points of the connected curves. The first curve is constructed from the first point to the fourth point in the points array by using the second and third points as control points. In addition to the endpoint of the previous curve, each subsequent curve in the sequence needs exactly three more points: the next two points in the sequence are control points, and the third is the endpoint for the added curve.
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the first cubic curve in the sequence.

◆ add_beziers() [2/2]

void xtd::drawing::drawing_2d::graphics_path::add_beziers ( const std::vector< xtd::drawing::point_f > &  points)

Adds a sequence of connected cubic Bézier curves to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curves.
Remarks
The points parameter specifies an array of endpoints and control points of the connected curves. The first curve is constructed from the first point to the fourth point in the points array by using the second and third points as control points. In addition to the endpoint of the previous curve, each subsequent curve in the sequence needs exactly three more points: the next two points in the sequence are control points, and the third is the endpoint for the added curve.
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the first cubic curve in the sequence.

◆ add_closed_curve() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const std::vector< xtd::drawing::point > &  points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

Parameters
pointsAn array of xtd::drawing::point structures that represents the points that define the curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points. If the first point and the last point in the points array are not the same point, the curve is closed by connecting these two points.The tension value cannot be set for this method, and defaults to a value equivalent to 0.0.

◆ add_closed_curve() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const std::vector< xtd::drawing::point_f > &  points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points. If the first point and the last point in the points array are not the same point, the curve is closed by connecting these two points.The tension value cannot be set for this method, and defaults to a value equivalent to 0.0.

◆ add_closed_curve() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const std::vector< xtd::drawing::point > &  points,
float  tension 
)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
tensionA value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points. If the first point and the last point in the points array are not the same point, the curve is closed by connecting these two points.

◆ add_closed_curve() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const std::vector< xtd::drawing::point_f > &  points,
float  tension 
)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
tensionA value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points. If the first point and the last point in the points array are not the same point, the curve is closed by connecting these two points.

◆ add_curve() [1/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point > &  points)

Adds a spline curve to the current figure.

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.

◆ add_curve() [2/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point_f > &  points)

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.

◆ add_curve() [3/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point > &  points,
float  tension 
)

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
tensionA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.

◆ add_curve() [4/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point_f > &  points,
float  tension 
)

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
tensionA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.

◆ add_curve() [5/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point > &  points,
size_t  offset,
size_t  number_of_segments,
float  tension 
)

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
offsethe index of the element in the points array that is used as the first point in the curve.
number_of_segmentsThe number of segments used to draw the curve. A segment can be thought of as a line connecting two points.
tensionA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.
The curve begins at the point in the array specified by offset, and includes the number of points (segments) specified by number_of_segments.

◆ add_curve() [6/6]

void xtd::drawing::drawing_2d::graphics_path::add_curve ( const std::vector< xtd::drawing::point_f > &  points,
size_t  offset,
size_t  number_of_segments,
float  tension 
)

Adds a spline curve to the current figure.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the curve.
offsethe index of the element in the points array that is used as the first point in the curve.
number_of_segmentsThe number of segments used to draw the curve. A segment can be thought of as a line connecting two points.
tensionA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.
The curve begins at the point in the array specified by offset, and includes the number of points (segments) specified by number_of_segments.

◆ add_ellipse() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_ellipse ( const xtd::drawing::rectangle rect)

Adds an ellipse to the current path.

Parameters
rectA xtd::drawing::rectangle that represents the bounding rectangle that defines the ellipse.

◆ add_ellipse() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_ellipse ( const xtd::drawing::rectangle_f rect)

Adds an ellipse to the current path.

Parameters
rectA xtd::drawing::rectangle_f that represents the bounding rectangle that defines the ellipse.

◆ add_ellipse() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_ellipse ( int32  x,
int32  y,
int32  width,
int32  height 
)

Adds an ellipse to the current path.

Parameters
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper left corner of the bounding rectangle that defines the ellipse.
widthThe width of the bounding rectangle that defines the ellipse.
heightThe height of the bounding rectangle that defines the ellipse.

◆ add_ellipse() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_ellipse ( float  x,
float  y,
float  width,
float  height 
)

Adds an ellipse to the current path.

Parameters
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper left corner of the bounding rectangle that defines the ellipse.
widthThe width of the bounding rectangle that defines the ellipse.
heightThe height of the bounding rectangle that defines the ellipse.

◆ add_line() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_line ( const xtd::drawing::point pt1,
const xtd::drawing::point pt2 
)

Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.

Parameters
pt1A xtd::drawing::point that represents the starting point of the line.
pt2A xtd::drawing::point that represents the endpoint of the line.
Remarks
This method adds the line segment defined by the specified points to the end of this xtd::drawing::drawing_2d::graphics_path. If there are previous lines or curves in the xtd::drawing::drawing_2d::graphics_path, a line segment is drawn to connect the last point in the path to the first point in the new line segment.

◆ add_line() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_line ( const xtd::drawing::point_f pt1,
const xtd::drawing::point_f pt2 
)

Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.

Parameters
pt1A xtd::drawing::point_f that represents the starting point of the line.
pt2A xtd::drawing::point_f that represents the endpoint of the line.
Remarks
This method adds the line segment defined by the specified points to the end of this xtd::drawing::drawing_2d::graphics_path. If there are previous lines or curves in the xtd::drawing::drawing_2d::graphics_path, a line segment is drawn to connect the last point in the path to the first point in the new line segment.

◆ add_line() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_line ( int32  x1,
int32  y1,
int32  x2,
int32  y2 
)

Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.

Parameters
x1The x-coordinate of the starting point of the line.
y1The y-coordinate of the starting point of the line.
x2The x-coordinate of the endpoint of the line.
y2The y-coordinate of the endpoint of the line.
Remarks
This method adds the line segment defined by the specified points to the end of this xtd::drawing::drawing_2d::graphics_path. If there are previous lines or curves in the xtd::drawing::drawing_2d::graphics_path, a line segment is drawn to connect the last point in the path to the first point in the new line segment.

◆ add_line() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_line ( float  x1,
float  y1,
float  x2,
float  y2 
)

Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.

Parameters
x1The x-coordinate of the starting point of the line.
y1The y-coordinate of the starting point of the line.
x2The x-coordinate of the endpoint of the line.
y2The y-coordinate of the endpoint of the line.
Remarks
This method adds the line segment defined by the specified points to the end of this xtd::drawing::drawing_2d::graphics_path. If there are previous lines or curves in the xtd::drawing::drawing_2d::graphics_path, a line segment is drawn to connect the last point in the path to the first point in the new line segment.

◆ add_lines() [1/2]

void xtd::drawing::drawing_2d::graphics_path::add_lines ( const std::vector< xtd::drawing::point > &  points)

Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.

Parameters
pointsAn array of xtd::drawing::point structures that represents the points that define the line segments to add.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment the starting point of the line. The points parameter specifies an array of endpoints. The first two specify the first line. Each additional point specifies the endpoint of a line segment whose starting point is the endpoint of the previous line.

◆ add_lines() [2/2]

void xtd::drawing::drawing_2d::graphics_path::add_lines ( const std::vector< xtd::drawing::point_f > &  points)

Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.

Parameters
pointsAn array of xtd::drawing::point_f structures that represents the points that define the line segments to add.
Remarks
If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment the starting point of the line. The points parameter specifies an array of endpoints. The first two specify the first line. Each additional point specifies the endpoint of a line segment whose starting point is the endpoint of the previous line.

◆ add_path()

void xtd::drawing::drawing_2d::graphics_path::add_path ( const graphics_path adding_path,
bool  connect 
)

Appends the specified xtd::drawing::drawing_2d::graphics_path to this path.

Parameters
adding_pathThe xtd::drawing::drawing_2d::graphics_path to add.
connectA bool value that specifies whether the first figure in the added path is part of the last figure in this path. A value of true specifies that (if possible) the first figure in the added path is part of the last figure in this path. A value of false specifies that the first figure in the added path is separate from the last figure in this path.

◆ add_pie() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_pie ( const xtd::drawing::rectangle rect,
float  start_angle,
float  sweep_angle 
)

Adds the outline of a pie shape to this path.

Parameters
rectA xtd::drawing::rectangle that represents the bounding rectangle that defines the ellipse from which the pie is drawn.
start_angleThe starting angle for the pie section, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the pie section, measured in degrees clockwise from start_angle.
Remarks
The pie shape is defined by a partial outline of an ellipse and the two radial lines that intersect the endpoints of the partial outline. The partial outline begins at start_angle (measured clockwise from the x-axis) and ends at start_angle + sweep_angle.

◆ add_pie() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_pie ( const xtd::drawing::rectangle_f rect,
float  start_angle,
float  sweep_angle 
)

Adds the outline of a pie shape to this path.

Parameters
rectA xtd::drawing::rectangle_f that represents the bounding rectangle that defines the ellipse from which the pie is drawn.
start_angleThe starting angle for the pie section, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the pie section, measured in degrees clockwise from start_angle.
Remarks
The pie shape is defined by a partial outline of an ellipse and the two radial lines that intersect the endpoints of the partial outline. The partial outline begins at start_angle (measured clockwise from the x-axis) and ends at start_angle + sweep_angle.

◆ add_pie() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_pie ( int32  x,
int32  y,
int32  width,
int32  height,
float  start_angle,
float  sweep_angle 
)

Adds the outline of a pie shape to this path.

Parameters
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn.
widthThe width of the bounding rectangle that defines the ellipse from which the pie is drawn.
heightThe height of the bounding rectangle that defines the ellipse from which the pie is drawn.
start_angleThe starting angle for the pie section, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the pie section, measured in degrees clockwise from start_angle.
Remarks
The pie shape is defined by a partial outline of an ellipse and the two radial lines that intersect the endpoints of the partial outline. The partial outline begins at start_angle (measured clockwise from the x-axis) and ends at start_angle + sweep_angle.

◆ add_pie() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_pie ( float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)

Adds the outline of a pie shape to this path.

Parameters
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn.
widthThe width of the bounding rectangle that defines the ellipse from which the pie is drawn.
heightThe height of the bounding rectangle that defines the ellipse from which the pie is drawn.
start_angleThe starting angle for the pie section, measured in degrees clockwise from the x-axis.
sweep_angleThe angle between start_angle and the end of the pie section, measured in degrees clockwise from start_angle.
Remarks
The pie shape is defined by a partial outline of an ellipse and the two radial lines that intersect the endpoints of the partial outline. The partial outline begins at start_angle (measured clockwise from the x-axis) and ends at start_angle + sweep_angle.

◆ add_polygon() [1/2]

void xtd::drawing::drawing_2d::graphics_path::add_polygon ( const std::vector< xtd::drawing::point > &  points)

Adds a polygon to this path.

Parameters
pointsAn array of xtd::drawing::point structures that defines the polygon to add.
Remarks
The points in the points array specify the vertices of a polygon. If the first point in the array is not the same as the last point, those two points are connected to close the polygon.

◆ add_polygon() [2/2]

void xtd::drawing::drawing_2d::graphics_path::add_polygon ( const std::vector< xtd::drawing::point_f > &  points)

Adds a polygon to this path.

Parameters
pointsAn array of xtd::drawing::point_f structures that defines the polygon to add.
Remarks
The points in the points array specify the vertices of a polygon. If the first point in the array is not the same as the last point, those two points are connected to close the polygon.

◆ add_rectangle() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_rectangle ( const xtd::drawing::rectangle rect)

Adds a rectangle to this path.

Parameters
rectA xtd::drawing::rectangle that represents the rectangle to add.

◆ add_rectangle() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_rectangle ( const xtd::drawing::rectangle_f rect)

Adds a rectangle to this path.

Parameters
rectA xtd::drawing::rectangle_f that represents the rectangle to add.

◆ add_rectangle() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_rectangle ( int32  x,
int32  y,
int32  width,
int32  height 
)

Adds a rectangle to this path.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle.
yThe y-coordinate of the upper left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.

◆ add_rectangle() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_rectangle ( float  x,
float  y,
float  width,
float  height 
)

Adds a rectangle to this path.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle.
yThe y-coordinate of the upper left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.

◆ add_rectangles() [1/2]

void xtd::drawing::drawing_2d::graphics_path::add_rectangles ( const std::vector< xtd::drawing::rectangle > &  rects)

Adds a series of rectangles to this path.

Parameters
rectsAn array of xtd::drawing::rectangle structures that represents the rectangles to add.

◆ add_rectangles() [2/2]

void xtd::drawing::drawing_2d::graphics_path::add_rectangles ( const std::vector< xtd::drawing::rectangle_f > &  rects)

Adds a series of rectangles to this path.

Parameters
rectsAn array of xtd::drawing::rectangle_f structures that represents the rectangles to add.

◆ add_rounded_rectangle() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( const xtd::drawing::rectangle rect,
float  radius 
)

Adds a rounded rectangle to this path.

Parameters
rectA xtd::drawing::rectangle that represents the rounded rectangle to add.
radiusThe radius of the rounded rectange angles.

◆ add_rounded_rectangle() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( const xtd::drawing::rectangle_f rect,
float  radius 
)

Adds a rounded rectangle to this path.

Parameters
rectA xtd::drawing::rectangle that represents the rounded rectangle to add.
radiusThe radius of the rounded rectange angles.

◆ add_rounded_rectangle() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( int32  x,
int32  y,
int32  width,
int32  height,
float  radius 
)

Adds a rounded rectangle to this path.

Parameters
xThe x-coordinate of the upper-left corner of the rounded rectangle.
yThe y-coordinate of the upper left corner of the rounded rectangle.
widthThe width of the rounded rectangle.
heightThe height of the rounded rectangle.
radiusThe radius of the rounded rectange angles.

◆ add_rounded_rectangle() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( float  x,
float  y,
float  width,
float  height,
float  radius 
)

Adds a rounded rectangle to this path.

Parameters
xThe x-coordinate of the upper-left corner of the rounded rectangle.
yThe y-coordinate of the upper left corner of the rounded rectangle.
widthThe width of the rounded rectangle.
heightThe height of the rounded rectangle.
radiusThe radius of the rounded rectange angles.

◆ add_string() [1/4]

void xtd::drawing::drawing_2d::graphics_path::add_string ( const xtd::string s,
const xtd::drawing::font_family family,
xtd::drawing::font_style  style,
float  em_size,
const xtd::drawing::point origin,
const xtd::drawing::string_format format 
)

Adds a text string to this path.

Parameters
sThe xtd::string to add.
familyA xtd::drawing::font_family that represents the name of the font with which the test is drawn.
em_sizeThe height of the em square box that bounds the character.
originA xtd::drawing::point that represents the point where the text starts.
formatA xtd::drawing::string_format that specifies text formatting information, such as line spacing and alignment.

◆ add_string() [2/4]

void xtd::drawing::drawing_2d::graphics_path::add_string ( const xtd::string s,
const xtd::drawing::font_family family,
xtd::drawing::font_style  style,
float  em_size,
const xtd::drawing::point_f origin,
const xtd::drawing::string_format format 
)

Adds a text string to this path.

Parameters
sThe xtd::string to add.
familyA xtd::drawing::font_family that represents the name of the font with which the test is drawn.
em_sizeThe height of the em square box that bounds the character.
originA xtd::drawing::point_f that represents the point where the text starts.
formatA xtd::drawing::string_format that specifies text formatting information, such as line spacing and alignment.

◆ add_string() [3/4]

void xtd::drawing::drawing_2d::graphics_path::add_string ( const xtd::string s,
const xtd::drawing::font_family family,
xtd::drawing::font_style  style,
float  em_size,
const xtd::drawing::rectangle layout_rect,
const xtd::drawing::string_format format 
)

Adds a text string to this path.

Parameters
sThe xtd::string to add.
familyA xtd::drawing::font_family that represents the name of the font with which the test is drawn.
em_sizeThe height of the em square box that bounds the character.
layout_rectA xtd::drawing::rectangle that represents the rectangle that bounds the text.
formatA xtd::drawing::string_format that specifies text formatting information, such as line spacing and alignment.

◆ add_string() [4/4]

void xtd::drawing::drawing_2d::graphics_path::add_string ( const xtd::string s,
const xtd::drawing::font_family family,
xtd::drawing::font_style  style,
float  em_size,
const xtd::drawing::rectangle_f layout_rect,
const xtd::drawing::string_format format 
)

Adds a text string to this path.

Parameters
sThe xtd::string to add.
familyA xtd::drawing::font_family that represents the name of the font with which the test is drawn.
em_sizeThe height of the em square box that bounds the character.
layout_rectA xtd::drawing::rectangle_f that represents the rectangle that bounds the text.
formatA xtd::drawing::string_format that specifies text formatting information, such as line spacing and alignment.

◆ close_all_figures()

void xtd::drawing::drawing_2d::graphics_path::close_all_figures ( )

Closes all open figures in this path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.

◆ close_figure()

void xtd::drawing::drawing_2d::graphics_path::close_figure ( )

Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.

◆ flatten()

void xtd::drawing::drawing_2d::graphics_path::flatten ( )

Converts each curve in this path into a sequence of connected line segments.

◆ get_bounds()

xtd::drawing::rectangle_f xtd::drawing::drawing_2d::graphics_path::get_bounds ( ) const

Returns a rectangle that bounds this xtd::drawing::drawing_2d::graphics_path.

Returns
A xtd::drawing::rectangle_f that represents a rectangle that bounds this xtd::drawing::drawing_2d::graphics_path.
Remarks
The size of the returned bounding rectangle is influenced by the type of end caps, pen width, and pen miter limit, and therefore produces a "loose fit" to the bounded path. The approximate formula is: the initial bounding rectangle is inflated by pen width, and this result is multiplied by the miter limit, plus some additional margin to allow for end caps.

◆ get_lat_point()

xtd::drawing::point_f xtd::drawing::drawing_2d::graphics_path::get_lat_point ( ) const

Gets the last point of this xtd::drawing::drawing_2d::graphics_path.

Returns
A xtd::drawing::point_f that represents the last point in this xtd::drawing::drawing_2d::graphics_path.

◆ is_vsible() [1/4]

bool xtd::drawing::drawing_2d::graphics_path::is_vsible ( const xtd::drawing::point point) const

Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.

Parameters
pointA xtd::drawing::point that represents the point to test.
Returns
This method returns true if the specified point is contained within this xtd::drawing::drawing_2d::graphics_path; otherwise, false.

◆ is_vsible() [2/4]

bool xtd::drawing::drawing_2d::graphics_path::is_vsible ( const xtd::drawing::point_f point) const

Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.

Parameters
pointA xtd::drawing::point_f that represents the point to test.
Returns
This method returns true if the specified point is contained within this xtd::drawing::drawing_2d::graphics_path; otherwise, false.

◆ is_vsible() [3/4]

bool xtd::drawing::drawing_2d::graphics_path::is_vsible ( int32  x,
int32  y 
) const

Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
Returns
This method returns true if the specified point is contained within this xtd::drawing::drawing_2d::graphics_path; otherwise, false.

◆ is_vsible() [4/4]

bool xtd::drawing::drawing_2d::graphics_path::is_vsible ( float  x,
float  y 
) const

Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
Returns
This method returns true if the specified point is contained within this xtd::drawing::drawing_2d::graphics_path; otherwise, false.

◆ reset()

void xtd::drawing::drawing_2d::graphics_path::reset ( )

Empties the xtd::drawing::drawing_2d::graphics_path::path_points and xtd::drawing::drawing_2d::graphics_path::path_types arrays and sets the xtd::drawing::drawing_2d::graphics_path::fill_mode to xtd::drawing::drawing_2d::fill_mode::alternate.

◆ reverse()

void xtd::drawing::drawing_2d::graphics_path::reverse ( )

Reverses the order of points in the xtd::drawing::drawing_2d::graphics_path::path_points array of this xtd::drawing::drawing_2d::graphics_path.

◆ start_figure()

void xtd::drawing::drawing_2d::graphics_path::start_figure ( )

Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.

Remarks
The user must keep the original points if they are needed. The original points are converted to cubic Bézier control points internally, therefore there is no mechanism for returning the original points.
This method starts a new subpath in the path. Subpaths allow you to separate a path into sections and use the xtd::drawing::drawing_2d::graphics_path_iterator class to iterate through the subpaths.

◆ to_string()

xtd::string xtd::drawing::drawing_2d::graphics_path::to_string ( ) const
overridevirtualnoexcept

Returns a xtd::string that represents the current object.

Returns
A string that represents the current object.
Examples
The following code example demonstrates what to_string returns.
#include <xtd/xtd>
using namespace xtd;
namespace examples {
namespace object_test {
class object1 : public object {
};
}
}
auto main() -> int {
ptr<object> obj1 = new_ptr<examples::object_test::object1>();
console::write_line(obj1->to_string());
ptr<object> obj2 = new_ptr<date_time>(1971, 1, 5, 23, 5, 0);
console::write_line(obj2->to_string());
ptr<object> obj3 = new_ptr<boolean_object>();
console::write_line(obj3->to_string());
}
// This code produces the following output :
//
// examples::object_test::object1
// Tue Jan 5 23:05:00 1971
// false
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10

Reimplemented from xtd::object.

◆ equals() [1/2]

virtual bool xtd::object::equals ( const object obj) const
virtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.
Examples
The following code example compares the current instance with another object.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
object3 = object1;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
}
// This code produces the following output :
//
// false
// false
// true
// true

Reimplemented from xtd::object.

◆ equals() [2/2]

template<typename object_a_t , typename object_b_t >
static bool xtd::object::equals ( const object_a_t &  object_a,
const object_b_t &  object_b 
)
inlinestaticnoexcept

Determines whether the specified object instances are considered equal.

Parameters
object_aThe first object to compare.
object_bThe second object to compare.
Returns
true if object_a is the same instance as object_b or if both are null references or if object_a(object_b) returns true. otherwise, false.
Examples
The following code example compares different objects.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
string s1 = "Tom";
string s2 = "Carol";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Tom";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Carol";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
}
// This code produces the following output :
//
// object::equals("Tom", "Carol") => false
// object::equals("Tom", "Tom") => true
// object::equals("", "Tom") => false
// object::equals("Carol", "") => false
// object::equals("", "") => true
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.

The documentation for this class was generated from the following file: