xtd 1.0.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
graphics_path()
Initializes a new instance of the xtd::drawing::drawing_2d::graphics_path class with a xtd::drawing::...
object()=default
Create a new instance of the ultimate base class object.
#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

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

auto handle () const noexcept -> xtd::intptr
 Gets the handle of the graphics path.
auto fill_mode () const noexcept -> xtd::drawing::drawing_2d::fill_mode
 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.
auto fill_mode (xtd::drawing::drawing_2d::fill_mode value) noexcept -> graphics_path &
 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

auto add_arc (const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle) -> void
 Appends an elliptical arc to the current figure.
auto add_arc (const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle) -> void
 Appends an elliptical arc to the current figure.
auto add_arc (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, float start_angle, float sweep_angle) -> void
 Appends an elliptical arc to the current figure.
auto add_arc (float x, float y, float width, float height, float start_angle, float sweep_angle) -> void
 Appends an elliptical arc to the current figure.
auto add_bezier (const xtd::drawing::point &pt1, const xtd::drawing::point &pt2, const xtd::drawing::point &pt3, const xtd::drawing::point &pt4) -> void
 Adds a cubic Bézier curve to the current figure.
auto 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) -> void
 Adds a cubic Bézier curve to the current figure.
auto add_bezier (xtd::int32 x1, xtd::int32 y1, xtd::int32 x2, xtd::int32 y2, xtd::int32 x3, xtd::int32 y3, xtd::int32 x4, xtd::int32 y4) -> void
 Adds a cubic Bézier curve to the current figure.
auto add_bezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) -> void
 Adds a cubic Bézier curve to the current figure.
auto add_beziers (const xtd::array< xtd::drawing::point > &points) -> void
 Adds a sequence of connected cubic Bézier curves to the current figure.
auto add_beziers (const xtd::array< xtd::drawing::point_f > &points) -> void
 Adds a sequence of connected cubic Bézier curves to the current figure.
auto add_closed_curve (const xtd::array< xtd::drawing::point > &points) -> void
 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.
auto add_closed_curve (const xtd::array< xtd::drawing::point_f > &points) -> void
 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.
auto add_closed_curve (const xtd::array< xtd::drawing::point > &points, float tension) -> void
 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.
auto add_closed_curve (const xtd::array< xtd::drawing::point_f > &points, float tension) -> void
 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.
auto add_curve (const xtd::array< xtd::drawing::point > &points) -> void
 Adds a spline curve to the current figure.
auto add_curve (const xtd::array< xtd::drawing::point_f > &points) -> void
 Adds a spline curve to the current figure.
auto add_curve (const xtd::array< xtd::drawing::point > &points, float tension) -> void
 Adds a spline curve to the current figure.
auto add_curve (const xtd::array< xtd::drawing::point_f > &points, float tension) -> void
 Adds a spline curve to the current figure.
auto add_curve (const xtd::array< xtd::drawing::point > &points, xtd::usize offset, xtd::usize number_of_segments, float tension) -> void
 Adds a spline curve to the current figure.
auto add_curve (const xtd::array< xtd::drawing::point_f > &points, xtd::usize offset, xtd::usize number_of_segments, float tension) -> void
 Adds a spline curve to the current figure.
auto add_ellipse (const xtd::drawing::rectangle &rect) -> void
 Adds an ellipse to the current path.
auto add_ellipse (const xtd::drawing::rectangle_f &rect) -> void
 Adds an ellipse to the current path.
auto add_ellipse (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Adds an ellipse to the current path.
auto add_ellipse (float x, float y, float width, float height) -> void
 Adds an ellipse to the current path.
auto add_line (const xtd::drawing::point &pt1, const xtd::drawing::point &pt2) -> void
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
auto add_line (const xtd::drawing::point_f &pt1, const xtd::drawing::point_f &pt2) -> void
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
auto add_line (xtd::int32 x1, xtd::int32 y1, xtd::int32 x2, xtd::int32 y2) -> void
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
auto add_line (float x1, float y1, float x2, float y2) -> void
 Appends a line segment to this xtd::drawing::drawing_2d::graphics_path.
auto add_lines (const xtd::array< xtd::drawing::point > &points) -> void
 Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.
auto add_lines (const xtd::array< xtd::drawing::point_f > &points) -> void
 Appends a series of connected line segments to the end of this xtd::drawing::drawing_2d::graphics_path.
auto add_path (const graphics_path &adding_path, bool connect) -> void
 Appends the specified xtd::drawing::drawing_2d::graphics_path to this path.
auto add_pie (const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle) -> void
 Adds the outline of a pie shape to this path.
auto add_pie (const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle) -> void
 Adds the outline of a pie shape to this path.
auto add_pie (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, float start_angle, float sweep_angle) -> void
 Adds the outline of a pie shape to this path.
auto add_pie (float x, float y, float width, float height, float start_angle, float sweep_angle) -> void
 Adds the outline of a pie shape to this path.
auto add_polygon (const xtd::array< xtd::drawing::point > &points) -> void
 Adds a polygon to this path.
auto add_polygon (const xtd::array< xtd::drawing::point_f > &points) -> void
 Adds a polygon to this path.
auto add_rectangle (const xtd::drawing::rectangle &rect) -> void
 Adds a rectangle to this path.
auto add_rectangle (const xtd::drawing::rectangle_f &rect) -> void
 Adds a rectangle to this path.
auto add_rectangle (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Adds a rectangle to this path.
auto add_rectangle (float x, float y, float width, float height) -> void
 Adds a rectangle to this path.
auto add_rectangles (const xtd::array< xtd::drawing::rectangle > &rects) -> void
 Adds a series of rectangles to this path.
auto add_rectangles (const xtd::array< xtd::drawing::rectangle_f > &rects) -> void
 Adds a series of rectangles to this path.
auto add_rounded_rectangle (const xtd::drawing::rectangle &rect, float radius) -> void
 Adds a rounded rectangle to this path.
auto add_rounded_rectangle (const xtd::drawing::rectangle_f &rect, float radius) -> void
 Adds a rounded rectangle to this path.
auto add_rounded_rectangle (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, float radius) -> void
 Adds a rounded rectangle to this path.
auto add_rounded_rectangle (float x, float y, float width, float height, float radius) -> void
 Adds a rounded rectangle to this path.
auto 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) -> void
 Adds a text string to this path.
auto 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) -> void
 Adds a text string to this path.
auto 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) -> void
 Adds a text string to this path.
auto 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) -> void
 Adds a text string to this path.
auto close_all_figures () -> void
 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.
auto close_figure () -> void
 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 object &obj) const noexcept override
 Determines whether the specified object is equal to the current object.
bool equals (const graphics_path &other) const noexcept override
 Determines whether the specified object is equal to the current object.
auto flatten () -> void
 Converts each curve in this path into a sequence of connected line segments.
auto get_bounds () const -> xtd::drawing::rectangle_f
 Returns a rectangle that bounds this xtd::drawing::drawing_2d::graphics_path.
auto get_lat_point () const -> xtd::drawing::point_f
 Gets the last point of this xtd::drawing::drawing_2d::graphics_path.
auto is_vsible (const xtd::drawing::point &point) const -> bool
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
auto is_vsible (const xtd::drawing::point_f &point) const -> bool
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
auto is_vsible (xtd::int32 x, xtd::int32 y) const -> bool
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
auto is_vsible (float x, float y) const -> bool
 Indicates whether the specified point is contained within this xtd::drawing::drawing_2d::graphics_path.
auto reset () -> void
 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.
auto reverse () -> void
 Reverses the order of points in the xtd::drawing::drawing_2d::graphics_path::path_points array of this xtd::drawing::drawing_2d::graphics_path.
auto start_figure () -> void
 Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
auto to_string () const noexcept -> xtd::string override
 Returns a xtd::string that represents the current object.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_hash_code () const noexcept -> xtd::usize
 Serves as a hash function for a particular type.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 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()

auto xtd::drawing::drawing_2d::graphics_path::handle ( ) const -> xtd::intptr
nodiscardnoexcept

Gets the handle of the graphics path.

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

◆ fill_mode() [1/2]

auto xtd::drawing::drawing_2d::graphics_path::fill_mode ( ) const -> xtd::drawing::drawing_2d::fill_mode
nodiscardnoexcept

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]

auto xtd::drawing::drawing_2d::graphics_path::fill_mode ( xtd::drawing::drawing_2d::fill_mode value) -> graphics_path &
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]

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

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]

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

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]

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

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]

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

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

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

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]

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

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]

auto xtd::drawing::drawing_2d::graphics_path::add_beziers ( const xtd::array< xtd::drawing::point > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_beziers ( const xtd::array< xtd::drawing::point_f > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const xtd::array< xtd::drawing::point > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const xtd::array< xtd::drawing::point_f > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const xtd::array< xtd::drawing::point > & points,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_closed_curve ( const xtd::array< xtd::drawing::point_f > & points,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point_f > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point > & points,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point_f > & points,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point > & points,
xtd::usize offset,
xtd::usize number_of_segments,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_curve ( const xtd::array< xtd::drawing::point_f > & points,
xtd::usize offset,
xtd::usize number_of_segments,
float tension ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_ellipse ( const xtd::drawing::rectangle & rect) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_ellipse ( const xtd::drawing::rectangle_f & rect) -> void

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]

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

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]

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

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]

auto xtd::drawing::drawing_2d::graphics_path::add_line ( const xtd::drawing::point & pt1,
const xtd::drawing::point & pt2 ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_line ( const xtd::drawing::point_f & pt1,
const xtd::drawing::point_f & pt2 ) -> void

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]

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

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]

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

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]

auto xtd::drawing::drawing_2d::graphics_path::add_lines ( const xtd::array< xtd::drawing::point > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_lines ( const xtd::array< xtd::drawing::point_f > & points) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::add_path ( const graphics_path & adding_path,
bool connect ) -> void

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]

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

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]

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

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]

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

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]

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

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]

auto xtd::drawing::drawing_2d::graphics_path::add_polygon ( const xtd::array< xtd::drawing::point > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_polygon ( const xtd::array< xtd::drawing::point_f > & points) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_rectangle ( const xtd::drawing::rectangle & rect) -> void

Adds a rectangle to this path.

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

◆ add_rectangle() [2/4]

auto xtd::drawing::drawing_2d::graphics_path::add_rectangle ( const xtd::drawing::rectangle_f & rect) -> void

Adds a rectangle to this path.

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

◆ add_rectangle() [3/4]

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

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]

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

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]

auto xtd::drawing::drawing_2d::graphics_path::add_rectangles ( const xtd::array< xtd::drawing::rectangle > & rects) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_rectangles ( const xtd::array< xtd::drawing::rectangle_f > & rects) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( const xtd::drawing::rectangle & rect,
float radius ) -> void

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]

auto xtd::drawing::drawing_2d::graphics_path::add_rounded_rectangle ( const xtd::drawing::rectangle_f & rect,
float radius ) -> void

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]

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

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]

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

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::close_all_figures ( ) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::close_figure ( ) -> void

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.

◆ equals() [1/2]

bool xtd::drawing::drawing_2d::graphics_path::equals ( const object & obj) const
overridevirtualnoexcept

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.

Reimplemented from xtd::object.

◆ equals() [2/2]

bool xtd::drawing::drawing_2d::graphics_path::equals ( const graphics_path & other) const
overridenoexcept

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

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ flatten()

auto xtd::drawing::drawing_2d::graphics_path::flatten ( ) -> void

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

◆ get_bounds()

auto xtd::drawing::drawing_2d::graphics_path::get_bounds ( ) const -> xtd::drawing::rectangle_f
nodiscard

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()

auto xtd::drawing::drawing_2d::graphics_path::get_lat_point ( ) const -> xtd::drawing::point_f
nodiscard

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]

auto xtd::drawing::drawing_2d::graphics_path::is_vsible ( const xtd::drawing::point & point) const -> bool
nodiscard

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]

auto xtd::drawing::drawing_2d::graphics_path::is_vsible ( const xtd::drawing::point_f & point) const -> bool
nodiscard

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]

auto xtd::drawing::drawing_2d::graphics_path::is_vsible ( xtd::int32 x,
xtd::int32 y ) const -> bool
nodiscard

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]

auto xtd::drawing::drawing_2d::graphics_path::is_vsible ( float x,
float y ) const -> bool
nodiscard

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()

auto xtd::drawing::drawing_2d::graphics_path::reset ( ) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::reverse ( ) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::start_figure ( ) -> void

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()

auto xtd::drawing::drawing_2d::graphics_path::to_string ( ) const -> xtd::string
nodiscardoverridevirtualnoexcept

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>
namespace examples {
namespace object_test {
class object1 : public object {
};
}
}
auto main() -> int {
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());
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 auto write_line() -> void
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
auto new_ptr(args_t &&... args) -> xtd::ptr< type_t >
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24

Reimplemented from xtd::object.


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