xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::native::graphics_path Class Referencefinal
Inheritance diagram for xtd::drawing::native::graphics_path:
xtd::static_object

Definition

Contains graphics_path native API.

Namespace
xtd::drawing::native
Library
xtd.drawing.native
Warning
Internal use only

Protected Static Methods

static intptr create ()
 Creates graphics_path.
 
static void destroy (intptr handle)
 Destroys graphics_path.
 
static void add_arc (intptr handle, float x, float y, float width, float height, float start_angle, float sweep_angle)
 Appends an elliptical arc to the current figure.
 
static void add_bezier (intptr handle, 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.
 
static void add_beziers (intptr handle, std::vector< xtd::collections::generic::key_value_pair< float, float > > points)
 Adds a sequence of connected cubic Bézier curves to the current figure.
 
static void add_closed_curve (intptr handle, std::vector< xtd::collections::generic::key_value_pair< float, float > > points, float tension)
 Adds a closed curve to the path. A cardinal spline curve is used because the curve travels through each of the points in the array.
 
static void add_curve (intptr handle, std::vector< xtd::collections::generic::key_value_pair< float, float > > points, size_t offset, size_t number_of_segments, float tension)
 Adds a spline curve to the current figure.
 
static void add_ellipse (intptr handle, float x, float y, float width, float height)
 Adds an ellipse to the current path.
 
static void add_line (intptr handle, float x1, float y1, float x2, float y2)
 Appends a line segment to the graphics_path.
 
static void add_path (intptr handle, intptr path, bool connect)
 Appends the specified graphics_path to the path.
 
static void add_pie (intptr handle, float x, float y, float width, float height, float start_angle, float sweep_angle)
 Adds the outline of a pie shape to the path.
 
static void add_rectangle (intptr handle, float x, float y, float width, float height)
 Adds a rectangle to the path.
 
static void add_rounded_rectangle (intptr handle, float x, float y, float width, float height, float radius)
 Adds a rounded rectangle to the path.
 
static void add_string (intptr handle, const xtd::string &text, intptr font, float x, float y, int32 alignment, int32 line_alignment, int32 hot_key_prefix, int32 trimming)
 Adds a text string to the path.
 
static void add_string (intptr handle, const xtd::string &text, intptr font, float x, float y, float w, float h, int32 alignment, int32 line_alignment, int32 hot_key_prefix, int32 trimming)
 Adds a text string to the path.
 
static void close_all_figures (intptr handle)
 Closes all open figures in the path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.
 
static void close_figure (intptr handle)
 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.
 
static void flatten (intptr handle)
 Converts each curve in the path into a sequence of connected line segments.
 
static void get_bounds (intptr handle, float &x, float &y, float &width, float &height)
 Returns a rectangle that bounds the graphics_path.
 
static void get_last_point (intptr handle, float &x, float &y)
 Gets the last point of the graphics_path.
 
static bool is_vsible (intptr handle, float x, float y)
 Indicates whether the specified point is contained within the graphics_path.
 
static void reverse (intptr handle)
 Reverses the order of points of the graphics_path.
 
static void start_figure (intptr handle)
 Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
 

Member Function Documentation

◆ create()

static intptr xtd::drawing::native::graphics_path::create ( )
staticprotected

Creates graphics_path.

Returns
The created graphics_path handle.
Warning
Internal use only

◆ destroy()

static void xtd::drawing::native::graphics_path::destroy ( intptr  handle)
staticprotected

Destroys graphics_path.

Parameters
handleThe graphics_path handle.
Warning
Internal use only

◆ add_arc()

static void xtd::drawing::native::graphics_path::add_arc ( intptr  handle,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)
staticprotected

Appends an elliptical arc to the current figure.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_bezier()

static void xtd::drawing::native::graphics_path::add_bezier ( intptr  handle,
float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4 
)
staticprotected

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

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_beziers()

static void xtd::drawing::native::graphics_path::add_beziers ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< float, float > >  points 
)
staticprotected

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

Parameters
handleThe graphics_path handle.
pointsAn array of xtd::collections::generic::key_value_pair<float, float> structures that represents the points that define the curves.
Warning
Internal use only

◆ add_closed_curve()

static void xtd::drawing::native::graphics_path::add_closed_curve ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< float, float > >  points,
float  tension 
)
staticprotected

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

Parameters
handleThe graphics_path handle.
pointsAn array of xtd::collections::generic::key_value_pair<float, float> 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.
Warning
Internal use only

◆ add_curve()

static void xtd::drawing::native::graphics_path::add_curve ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< float, float > >  points,
size_t  offset,
size_t  number_of_segments,
float  tension 
)
staticprotected

Adds a spline curve to the current figure.

Parameters
handleThe graphics_path handle.
pointsAn array of xtd::collections::generic::key_value_pair<float, float> 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.
Warning
Internal use only

◆ add_ellipse()

static void xtd::drawing::native::graphics_path::add_ellipse ( intptr  handle,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Adds an ellipse to the current path.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_line()

static void xtd::drawing::native::graphics_path::add_line ( intptr  handle,
float  x1,
float  y1,
float  x2,
float  y2 
)
staticprotected

Appends a line segment to the graphics_path.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_path()

static void xtd::drawing::native::graphics_path::add_path ( intptr  handle,
intptr  path,
bool  connect 
)
staticprotected

Appends the specified graphics_path to the path.

Parameters
handleThe graphics_path handle.
adding_pathThe graphics path handle to add.
connectA bool value that specifies whether the first figure in the added path is part of the last figure in the path. A value of true specifies that (if possible) the first figure in the added path is part of the last figure in the path. A value of false specifies that the first figure in the added path is separate from the last figure in the path.
Warning
Internal use only

◆ add_pie()

static void xtd::drawing::native::graphics_path::add_pie ( intptr  handle,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)
staticprotected

Adds the outline of a pie shape to the path.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_rectangle()

static void xtd::drawing::native::graphics_path::add_rectangle ( intptr  handle,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Adds a rectangle to the path.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_rounded_rectangle()

static void xtd::drawing::native::graphics_path::add_rounded_rectangle ( intptr  handle,
float  x,
float  y,
float  width,
float  height,
float  radius 
)
staticprotected

Adds a rounded rectangle to the path.

Parameters
handleThe graphics_path handle.
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.
Warning
Internal use only

◆ add_string() [1/2]

static void xtd::drawing::native::graphics_path::add_string ( intptr  handle,
const xtd::string text,
intptr  font,
float  x,
float  y,
int32  alignment,
int32  line_alignment,
int32  hot_key_prefix,
int32  trimming 
)
staticprotected

Adds a text string to the path.

Parameters
handleThe graphics_path handle.
sThe xtd::string to add.
fontThe font handle.
xThe x-coordinate of the upper-left corner of the string.
yThe y-coordinate of the upper left corner of the string.
alignmentThe alignment of the text (see string_alignments.h for more information).
line_alignmentThe alignment of the text (see string_alignments.h for more information).
hot_key_prefixThe hotkey prefix value (see hot_key_prefixes.h for more information).
trimmingThe trimming value for the text (see string_trimmings.h for more information).
Warning
Internal use only

◆ add_string() [2/2]

static void xtd::drawing::native::graphics_path::add_string ( intptr  handle,
const xtd::string text,
intptr  font,
float  x,
float  y,
float  w,
float  h,
int32  alignment,
int32  line_alignment,
int32  hot_key_prefix,
int32  trimming 
)
staticprotected

Adds a text string to the path.

Parameters
handleThe graphics_path handle.
sThe xtd::string to add.
fontThe font handle.
xThe x-coordinate of the upper-left corner of the text.
yThe y-coordinate of the upper left corner of the text.
widthThe width of the text.
heightThe height of the text.
alignmentThe alignment of the text (see string_alignments.h for more information).
line_alignmentThe alignment of the text (see string_alignments.h for more information).
hot_key_prefixThe hotkey prefix value (see hot_key_prefixes.h for more information).
trimmingThe trimming value for the text (see string_trimmings.h for more information).
Warning
Internal use only

◆ close_all_figures()

static void xtd::drawing::native::graphics_path::close_all_figures ( intptr  handle)
staticprotected

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

Parameters
handleThe graphics_path handle.
Warning
Internal use only

◆ close_figure()

static void xtd::drawing::native::graphics_path::close_figure ( intptr  handle)
staticprotected

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.

Parameters
handleThe graphics_path handle.
Warning
Internal use only

◆ flatten()

static void xtd::drawing::native::graphics_path::flatten ( intptr  handle)
staticprotected

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

Parameters
handleThe graphics_path handle.
Warning
Internal use only

◆ get_bounds()

static void xtd::drawing::native::graphics_path::get_bounds ( intptr  handle,
float &  x,
float &  y,
float &  width,
float &  height 
)
staticprotected

Returns a rectangle that bounds the graphics_path.

Parameters
handleThe graphics_path handle.
xThe x-coordinate of the upper-left corner that represents a rectangle that bounds the graphics_path.
yThe y-coordinate of the upper-left corner that represents a rectangle that bounds the graphics_path.
widthThe width that represents a rectangle that bounds the graphics_path.
heightThe height that represents a rectangle that bounds the graphics_path.
Warning
Internal use only

◆ get_last_point()

static void xtd::drawing::native::graphics_path::get_last_point ( intptr  handle,
float &  x,
float &  y 
)
staticprotected

Gets the last point of the graphics_path.

Parameters
handleThe graphics_path handle.
xThe x-coordinate of the upper-left corner that represents the last point in the graphics_path.
yThe y-coordinate of the upper-left corner that represents the last point in the graphics_path.
Warning
Internal use only

◆ is_vsible()

static bool xtd::drawing::native::graphics_path::is_vsible ( intptr  handle,
float  x,
float  y 
)
staticprotected

Indicates whether the specified point is contained within the graphics_path.

Parameters
handleThe graphics_path handle.
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
Warning
Internal use only

◆ reverse()

static void xtd::drawing::native::graphics_path::reverse ( intptr  handle)
staticprotected

Reverses the order of points of the graphics_path.

Parameters
handleThe graphics_path handle.
Warning
Internal use only

◆ start_figure()

static void xtd::drawing::native::graphics_path::start_figure ( intptr  handle)
staticprotected

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

Parameters
handleThe graphics_path handle.
Warning
Internal use only

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