Contains graphics_path native API.
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. | |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Appends an elliptical arc to the current figure.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
y | The y-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
width | The width of the rectangular region that defines the ellipse from which the arc is drawn. |
height | The height of the rectangular region that defines the ellipse from which the arc is drawn. |
start_angle | The starting angle of the arc, measured in degrees clockwise from the x-axis. |
sweep_angle | The angle between start_angle and the end of the arc. |
|
staticprotected |
Adds a cubic Bézier curve to the current figure.
handle | The graphics_path handle. |
x1 | The x-coordinate of the starting point of the curve. |
y1 | The y-coordinate of the starting point of the curve. |
x2 | The x-coordinate of the first control point for the curve. |
y2 | The y-coordinate of the first control point for the curve. |
x3 | The x-coordinate of the second control point for the curve. |
y3 | The y-coordinate of the second control point for the curve. |
x4 | The x-coordinate of the endpoint of the curve. |
y4 | The y-coordinate of the endpoint of the curve. |
|
staticprotected |
Adds a sequence of connected cubic Bézier curves to the current figure.
handle | The graphics_path handle. |
points | An array of xtd::collections::generic::key_value_pair<float, float> structures that represents the points that define the curves. |
|
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.
handle | The graphics_path handle. |
points | An array of xtd::collections::generic::key_value_pair<float, float> structures that represents the points that define the curve. |
tension | A 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. |
|
staticprotected |
Adds a spline curve to the current figure.
handle | The graphics_path handle. |
points | An array of xtd::collections::generic::key_value_pair<float, float> structures that represents the points that define the curve. |
offset | he index of the element in the points array that is used as the first point in the curve. |
number_of_segments | The number of segments used to draw the curve. A segment can be thought of as a line connecting two points. |
tension | A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results. |
|
staticprotected |
Adds an ellipse to the current path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
y | The y-coordinate of the upper left corner of the bounding rectangle that defines the ellipse. |
width | The width of the bounding rectangle that defines the ellipse. |
height | The height of the bounding rectangle that defines the ellipse. |
|
staticprotected |
Appends a line segment to the graphics_path.
handle | The graphics_path handle. |
x1 | The x-coordinate of the starting point of the line. |
y1 | The y-coordinate of the starting point of the line. |
x2 | The x-coordinate of the endpoint of the line. |
y2 | The y-coordinate of the endpoint of the line. |
|
staticprotected |
Appends the specified graphics_path to the path.
handle | The graphics_path handle. |
adding_path | The graphics path handle to add. |
connect | A 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. |
|
staticprotected |
Adds the outline of a pie shape to the path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
y | The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
width | The width of the bounding rectangle that defines the ellipse from which the pie is drawn. |
height | The height of the bounding rectangle that defines the ellipse from which the pie is drawn. |
start_angle | The starting angle for the pie section, measured in degrees clockwise from the x-axis. |
sweep_angle | The angle between start_angle and the end of the pie section, measured in degrees clockwise from start_angle. |
|
staticprotected |
Adds a rectangle to the path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner of the rectangle. |
y | The y-coordinate of the upper left corner of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
|
staticprotected |
Adds a rounded rectangle to the path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner of the rounded rectangle. |
y | The y-coordinate of the upper left corner of the rounded rectangle. |
width | The width of the rounded rectangle. |
height | The height of the rounded rectangle. |
radius | The radius of the rounded rectange angles. |
|
staticprotected |
Adds a text string to the path.
handle | The graphics_path handle. |
s | The xtd::string to add. |
font | The font handle. |
x | The x-coordinate of the upper-left corner of the string. |
y | The y-coordinate of the upper left corner of the string. |
alignment | The alignment of the text (see string_alignments.h for more information). |
line_alignment | The alignment of the text (see string_alignments.h for more information). |
hot_key_prefix | The hotkey prefix value (see hot_key_prefixes.h for more information). |
trimming | The trimming value for the text (see string_trimmings.h for more information). |
|
staticprotected |
Adds a text string to the path.
handle | The graphics_path handle. |
s | The xtd::string to add. |
font | The font handle. |
x | The x-coordinate of the upper-left corner of the text. |
y | The y-coordinate of the upper left corner of the text. |
width | The width of the text. |
height | The height of the text. |
alignment | The alignment of the text (see string_alignments.h for more information). |
line_alignment | The alignment of the text (see string_alignments.h for more information). |
hot_key_prefix | The hotkey prefix value (see hot_key_prefixes.h for more information). |
trimming | The trimming value for the text (see string_trimmings.h for more information). |
|
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.
handle | The graphics_path 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.
handle | The graphics_path handle. |
|
staticprotected |
Converts each curve in the path into a sequence of connected line segments.
handle | The graphics_path handle. |
|
staticprotected |
Returns a rectangle that bounds the graphics_path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner that represents a rectangle that bounds the graphics_path. |
y | The y-coordinate of the upper-left corner that represents a rectangle that bounds the graphics_path. |
width | The width that represents a rectangle that bounds the graphics_path. |
height | The height that represents a rectangle that bounds the graphics_path. |
|
staticprotected |
Gets the last point of the graphics_path.
handle | The graphics_path handle. |
x | The x-coordinate of the upper-left corner that represents the last point in the graphics_path. |
y | The y-coordinate of the upper-left corner that represents the last point in the graphics_path. |
|
staticprotected |
Indicates whether the specified point is contained within the graphics_path.
handle | The graphics_path handle. |
x | The x-coordinate of the point to test. |
y | The y-coordinate of the point to test. |
|
staticprotected |
Reverses the order of points of the graphics_path.
handle | The graphics_path handle. |
|
staticprotected |
Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
handle | The graphics_path handle. |