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

Definition

Contains graphics native API.

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

Protected Static Methods

static void copy_from_graphics (intptr handle, intptr handle_source, int32 source_x, int32 source_y, int32 destination_x, int32 destination_y, int32 block_region_width, int32 block_region_height, int32 copy_pixel_operation)
 Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the graphics.
 
static void clear (intptr handle, xtd::byte a, xtd::byte r, xtd::byte g, xtd::byte b)
 Clears the entire drawing surface and fills it with the specified background color.
 
static void clip (intptr handle, intptr region)
 Sets a region handle that limits the drawing region of the graphics.
 
static void compositing_mode (intptr handle, int32 compositing_mode)
 Sets a value that specifies how composited images are drawn to the graphics.
 
static void compositing_quality (intptr handle, int32 compositing_quality)
 Sets the rendering quality of composited images drawn to the graphics.
 
static void copy_from_screen (intptr handle, int32 source_x, int32 source_y, int32 destination_x, int32 destination_y, int32 block_region_width, int32 block_region_height, int32 copy_pixel_operation)
 Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the graphics.
 
static void destroy (intptr handle)
 Destroys graphics_path.
 
static void draw_arc (intptr handle, intptr pen, float x, float y, float width, float height, float start_angle, float sweep_angle)
 Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
 
static void draw_bezier (intptr handle, intptr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
 Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
 
static void draw_beziers (intptr handle, intptr pen, const std::vector< xtd::collections::generic::key_value_pair< float, float > > &points)
 Draws a series of Bézier splines from an array of xtd::collections::generic::key_value_pair<float, float> structures.
 
static void draw_closed_curve (intptr handle, intptr pen, std::vector< xtd::collections::generic::key_value_pair< float, float > > points, float tension)
 Draws a closed cardinal spline defined by an array of xtd::collections::generic::key_value_pair<float, float> structures using a specified tension.
 
static void draw_curve (intptr handle, intptr pen, std::vector< xtd::collections::generic::key_value_pair< float, float > > points, float tension)
 Draws a cardinal spline through a specified array of xtd::collections::generic::key_value_pair<float, float> structures using a specified tension. The drawing begins offset from the beginning of the array.
 
static void draw_ellipse (intptr handle, intptr pen, float x, float y, float width, float heigh)
 Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.
 
static void draw_image (intptr handle, intptr image, float x, float y, float width, float height)
 Draws the specified image, using its original physical size, at the specified location, and size.
 
static void draw_image (intptr handle, intptr image, float dest_x, float dest_y, float dest_width, float dest_height, float src_x, float src_y, float src_width, float src_height)
 Draws the specified image, using its original physical size, at the specified location.
 
static void draw_image_disabled (intptr handle, intptr image, float x, float y, float width, float height, float brightness)
 Draws the specified dosabled image at the specified location and size.
 
static void draw_line (intptr handle, intptr pen, float x1, float y1, float x2, float y2)
 Draws a line connecting the two points specified by the coordinate pairs.
 
static void draw_lines (intptr handle, intptr pen, const std::vector< xtd::collections::generic::key_value_pair< float, float > > &points)
 Draws a series of line segments that connect an array of xtd::collections::generic::key_value_pair<float, float> structures.
 
static void draw_path (intptr handle, intptr pen, intptr graphics_path)
 Draws a graphics path.
 
static void draw_pie (intptr handle, intptr pen, float x, float y, float width, float height, float start_angle, float sweep_angle)
 Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
 
static void draw_polygon (intptr handle, intptr pen, const std::vector< xtd::collections::generic::key_value_pair< float, float > > &points)
 Draws a polygon defined by an array of xtd::collections::generic::key_value_pair<float, float> structures.
 
static void draw_rectangle (intptr handle, intptr pen, float x, float y, float width, float height)
 Draws a rectangle specified by a coordinate pair, a width, and a height.
 
static void draw_rectangles (intptr handle, intptr pen, std::vector< std::tuple< float, float, float, float > > &rects)
 Draws a series of rectangles specified by std::tuple<float, float, float, float> structures.
 
static void draw_rotated_string (intptr handle, const xtd::string &text, intptr font, intptr brush, float x, float y, float angle)
 Draws the specified text string at the specified location with the specified brush, font and angle.
 
static void draw_rounded_rectangle (intptr handle, intptr pen, float x, float y, float width, float height, float radius)
 Draws a rounded rectangle specified by a coordinate pair, a width, a height, and radius.
 
static void draw_string (intptr handle, const xtd::string &text, intptr font, intptr brush, float x, float y, int32 alignment, int32 line_alignment, int32 hot_key_prefix, int32 trimming)
 Draws the specified text string at the specified point with the specified brush and font handle using the formatting attributes of the format.
 
static void draw_string (intptr handle, const xtd::string &text, intptr font, intptr brush, float x, float y, float width, float height, int32 alignment, int32 line_alignment, int32 hot_key_prefix, int32 trimming, int32 string_formats)
 Draws the specified text string at the specified rectangle with the specified brush and font handle using the formatting attributes of the format.
 
static void fill_closed_curve (intptr handle, intptr brush, std::vector< xtd::collections::generic::key_value_pair< float, float > > points, uint32 fill_mode, float tension)
 Fills the interior of a closed cardinal spline curve defined by an array of xtd::collections::generic::key_value_pair<float, float> structures.
 
static void fill_ellipse (intptr handle, intptr brush, float x, float y, float width, float heigh)
 Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
 
static void fill_path (intptr handle, intptr brush, intptr graphics_path, int32 mode)
 Fills the interior of a graphics path.
 
static void fill_pie (intptr handle, intptr brush, float x, float y, float width, float height, float start_angle, float sweep_angle)
 Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
 
static void fill_polygon (intptr handle, intptr pen, const std::vector< xtd::collections::generic::key_value_pair< float, float > > &points, int32 fill_mode)
 Fills the interior of a polygon defined by an array of points specified by xtd::collections::generic::key_value_pair<float, float> structures using the specified fill mode.
 
static void fill_rectangle (intptr handle, intptr brush, float x, float y, float width, float height)
 Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
 
static void fill_rectangles (intptr handle, intptr brush, std::vector< std::tuple< float, float, float, float > > &rects)
 Fills the interiors of a series of rectangles specified by std::tuple<float, float, float, float> structures.
 
static void fill_region (intptr handle, intptr brush, intptr region)
 Fills the interior of a region.
 
static void fill_rounded_rectangle (intptr handle, intptr brush, float x, float y, float width, float height, float radius)
 Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius.
 
static void flush (intptr handle, int32 intention)
 Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish.
 
static intptr from_hdc (intptr hdc)
 Creates a new graphics from the specified handle to a device context.
 
static intptr from_hdc (intptr hdc, intptr hdevice)
 Creates a new graphics from the specified handle to a device contextand handle to a device.
 
static intptr from_hwnd (intptr hwnd)
 Creates a new graphics from the specified handle to a window.
 
static intptr from_image (intptr image)
 Creates a new graphics from the specified image.
 
static float get_dpi_x (intptr handle)
 Gets the horizontal resolution of this graphics.
 
static float get_dpi_y (intptr handle)
 Gets the vertical resolution of this graphics.
 
static intptr get_hdc (intptr handle)
 Gets the handle to the device context associated with this graphics.
 
static void get_nearest_color (intptr handle, xtd::byte original_a, xtd::byte original_r, xtd::byte original_g, xtd::byte original_b, xtd::byte &nearest_a, xtd::byte &nearest_r, xtd::byte &nearest_g, xtd::byte &nearest_b)
 Gets the nearest color to the specified color.
 
static void interpolation_mode (intptr handle, int32 interpolation_mode)
 Sets the interpolation mode associated with the graphics.
 
static void pixel_offset_mode (intptr handle, int32 pixel_offst_mode)
 Sets a value specifying how pixels are offset during rendering of this graphics.
 
static void measure_string (intptr handle, const xtd::string &text, intptr font, float &width, float &height, float max_width, float max_height, int32 alignment, int32 line_alignment, int32 hot_key_prefix, int32 trimming, size_t characters_fitted, size_t lines_filled, bool measure_trailing_spaces)
 Measures the specified string when drawn with the specified font and formatted with the specified format.
 
static void release_hdc (intptr handle, intptr hdc)
 Releases a device context handle obtained by a previous call to the xtd::drawing::native::graphics::get_hdc() method of the graphics.
 
static void reset_transform (intptr handle)
 Resets the world transformation matrix of the graphics to the identity matrix.
 
static void restore (intptr handle, intptr &gstate)
 Restores the state of the graphics to the state represented by a graphics state.
 
static void rotate_transform (intptr handle, float angle, int32 order)
 Applies the specified rotation to the transformation matrix of the graphics in the specified order.
 
static intptr save (intptr handle)
 Saves the current state of the graphics and identifies the saved state with a graphics state.
 
static void scale_transform (intptr handle, float sx, float sy, int32 order)
 Applies the specified scaling operation to the transformation matrix of the graphics in the specified order.
 
static void smoothing_mode (intptr handle, int32 smoothing_mode)
 Sets the rendering quality for the graphics.
 
static void text_contrast (intptr handle, int32 text_contrast)
 Sets the gamma correction value for rendering text.
 
static void text_rendering_hint (intptr handle, int32 text_rendering_hint)
 Sets the rendering mode for text associated with the graphics.
 
static intptr transform (intptr handle)
 Gets a copy of the geometric world transformation for the graphics.
 
static void transform (intptr handle, intptr matrix)
 Sets a copy of the geometric world transformation for the graphics.
 
static void translate_transform (intptr handle, float dx, float dy, int32 order)
 Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of the graphics in the specified order.
 
static xtd::string trim_string (intptr handle, const xtd::string &text, intptr font, float width, int32 trimming)
 Trims the specified string for a specified width with the specified font and trimming.
 
static void visible_clip_bounds (intptr handle, float &x, float &y, float &width, float &height)
 Gets the bounding rectangle of the visible clipping region of the graphics.
 

Member Function Documentation

◆ copy_from_graphics()

static void xtd::drawing::native::graphics::copy_from_graphics ( intptr  handle,
intptr  handle_source,
int32  source_x,
int32  source_y,
int32  destination_x,
int32  destination_y,
int32  block_region_width,
int32  block_region_height,
int32  copy_pixel_operation 
)
staticprotected

Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the graphics.

Parameters
handleThe graphics handle.
handle_sourceThe source graphics handle.
source_xThe x-coordinate of the upper-left corner of the source rectangle.
source_yThe x-coordinate of the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the upper-left corner of the destination rectangle.
destination_yThe y-coordinate of the upper-left corner of the destination rectangle.
block_region_widthThe width of the source and destination rectangle.
block_region_heightThe height of the source and destination rectangle.
copy_pixel_operationThe copy pixel operation values (see copy_pixel_operations.h for more information).
Warning
Internal use only

◆ clear()

static void xtd::drawing::native::graphics::clear ( intptr  handle,
xtd::byte  a,
xtd::byte  r,
xtd::byte  g,
xtd::byte  b 
)
staticprotected

Clears the entire drawing surface and fills it with the specified background color.

Parameters
handleThe graphics handle.
aThe alpha component of the background color of the drawing surface.
rThe red component of the background color of the drawing surface.
gThe green component of the background color of the drawing surface.
bThe blue component of the background color of the drawing surface.
Warning
Internal use only

◆ clip()

static void xtd::drawing::native::graphics::clip ( intptr  handle,
intptr  region 
)
staticprotected

Sets a region handle that limits the drawing region of the graphics.

Parameters
handleThe graphics handle.
regionA region handle that limits the portion of the graphics that is currently available for drawing.
Warning
Internal use only

◆ compositing_mode()

static void xtd::drawing::native::graphics::compositing_mode ( intptr  handle,
int32  compositing_mode 
)
staticprotected

Sets a value that specifies how composited images are drawn to the graphics.

Parameters
handleThe graphics handle.
compositing_modeThis property specifies a compositing mode value (see compositing_modes.h for more information).
Warning
Internal use only

◆ compositing_quality()

static void xtd::drawing::native::graphics::compositing_quality ( intptr  handle,
int32  compositing_quality 
)
staticprotected

Sets the rendering quality of composited images drawn to the graphics.

Parameters
handleThe graphics handle.
compositing_qualityThis property specifies a compositing quality value (see compositing_qualities.h for more information).
Warning
Internal use only

◆ copy_from_screen()

static void xtd::drawing::native::graphics::copy_from_screen ( intptr  handle,
int32  source_x,
int32  source_y,
int32  destination_x,
int32  destination_y,
int32  block_region_width,
int32  block_region_height,
int32  copy_pixel_operation 
)
staticprotected

Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the graphics.

Parameters
handleThe graphics handle.
source_xThe x-coordinate of the upper-left corner of the source rectangle.
source_yThe y-coordinate of the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the upper-left corner of the destination rectangle.
destination_yThe x-coordinate of the upper-left corner of the destination rectangle.
block_region_widthThe width of the area to be transferred.
block_region_heightThe height of the area to be transferred.
copy_pixel_operationThe copy pixel operation values (see copy_pixel_operations.h for more information).
Warning
Internal use only

◆ destroy()

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

Destroys graphics_path.

Parameters
handleThe graphics handle.
Warning
Internal use only

◆ draw_arc()

static void xtd::drawing::native::graphics::draw_arc ( intptr  handle,
intptr  pen,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)
staticprotected

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the arc.
xThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthWidth of the rectangle that defines the ellipse.
heightHeight of the rectangle that defines the ellipse.
start_angleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
Warning
Internal use only

◆ draw_bezier()

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

Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the curve.
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 of the curve.
y2The y-coordinate of the first control point of the curve.
x3The x-coordinate of the second control point of the curve.
y3The y-coordinate of the second control point of the curve.
x4The x-coordinate of the ending point of the curve.
y4The y-coordinate of the ending point of the curve.
Warning
Internal use only

◆ draw_beziers()

static void xtd::drawing::native::graphics::draw_beziers ( intptr  handle,
intptr  pen,
const std::vector< xtd::collections::generic::key_value_pair< float, float > > &  points 
)
staticprotected

Draws a series of Bézier splines from an array of xtd::collections::generic::key_value_pair<float, float> structures.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the curve.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.
Warning
Internal use only

◆ draw_closed_curve()

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

Draws a closed cardinal spline defined by an array of xtd::collections::generic::key_value_pair<float, float> structures using a specified tension.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the curve.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that define the spline.
tensionalue greater than or equal to 0.0F that specifies the tension of the curve.
Warning
Internal use only

◆ draw_curve()

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

Draws a cardinal spline through a specified array of xtd::collections::generic::key_value_pair<float, float> structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the curve.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
tensionValue greater than or equal to 0.0F that specifies the tension of the curve.
Warning
Internal use only

◆ draw_ellipse()

static void xtd::drawing::native::graphics::draw_ellipse ( intptr  handle,
intptr  pen,
float  x,
float  y,
float  width,
float  heigh 
)
staticprotected

Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the ellipse.
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.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
Warning
Internal use only

◆ draw_image() [1/2]

static void xtd::drawing::native::graphics::draw_image ( intptr  handle,
intptr  image,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Draws the specified image, using its original physical size, at the specified location, and size.

Parameters
handleThe graphics handle.
imageAn image handle to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
Warning
Internal use only

◆ draw_image() [2/2]

static void xtd::drawing::native::graphics::draw_image ( intptr  handle,
intptr  image,
float  dest_x,
float  dest_y,
float  dest_width,
float  dest_height,
float  src_x,
float  src_y,
float  src_width,
float  src_height 
)
staticprotected

Draws the specified image, using its original physical size, at the specified location.

Parameters
handleThe graphics handle.
imageAn image handle to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
widthWidth of the bounding rectangle that defines the image.
heightHeight of the bounding rectangle that defines the image.
Warning
Internal use only

◆ draw_image_disabled()

static void xtd::drawing::native::graphics::draw_image_disabled ( intptr  handle,
intptr  image,
float  x,
float  y,
float  width,
float  height,
float  brightness 
)
staticprotected

Draws the specified dosabled image at the specified location and size.

Parameters
handleThe graphics handle.
imageAn image handle to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
widthWidth of the bounding rectangle that defines the image.
heightHeight of the bounding rectangle that defines the image.
brightnessThe image brightness from 0.0 to 1.0.
Warning
Internal use only

◆ draw_line()

static void xtd::drawing::native::graphics::draw_line ( intptr  handle,
intptr  pen,
float  x1,
float  y1,
float  x2,
float  y2 
)
staticprotected

Draws a line connecting the two points specified by the coordinate pairs.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the line.
x1The x-coordinate of the first point.
y1The y-coordinate of the first point.
x2The x-coordinate of the second point.
y2The y-coordinate of the second point.
Warning
Internal use only

◆ draw_lines()

static void xtd::drawing::native::graphics::draw_lines ( intptr  handle,
intptr  pen,
const std::vector< xtd::collections::generic::key_value_pair< float, float > > &  points 
)
staticprotected

Draws a series of line segments that connect an array of xtd::collections::generic::key_value_pair<float, float> structures.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the line segments.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that represent the points to connect.
Warning
Internal use only

◆ draw_path()

static void xtd::drawing::native::graphics::draw_path ( intptr  handle,
intptr  pen,
intptr  graphics_path 
)
staticprotected

Draws a graphics path.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the path.
pathA graphics path handle to draw.
Warning
Internal use only

◆ draw_pie()

static void xtd::drawing::native::graphics::draw_pie ( intptr  handle,
intptr  pen,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)
staticprotected

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters
handleThe graphics handle.
penPen that determines the color, width, and style of the pie shape.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heughtHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Warning
Internal use only

◆ draw_polygon()

static void xtd::drawing::native::graphics::draw_polygon ( intptr  handle,
intptr  pen,
const std::vector< xtd::collections::generic::key_value_pair< float, float > > &  points 
)
staticprotected

Draws a polygon defined by an array of xtd::collections::generic::key_value_pair<float, float> structures.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the polygon.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that represent the vertices of the polygon.
Warning
Internal use only

◆ draw_rectangle()

static void xtd::drawing::native::graphics::draw_rectangle ( intptr  handle,
intptr  pen,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Draws a rectangle specified by a coordinate pair, a width, and a height.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the rectangle.
xThe x-coordinate of the upper-left corner of the rectangle to draw.
yThe y-coordinate of the upper-left corner of the rectangle to draw.
widthThe width of the rectangle to draw.
heightThe height of the rectangle to draw.
Warning
Internal use only

◆ draw_rectangles()

static void xtd::drawing::native::graphics::draw_rectangles ( intptr  handle,
intptr  pen,
std::vector< std::tuple< float, float, float, float > > &  rects 
)
staticprotected

Draws a series of rectangles specified by std::tuple<float, float, float, float> structures.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the outlines of the rectangles.
rectsArray of std::tuple<float, float, float, float> structures that represent the rectangles to draw.
Warning
Internal use only

◆ draw_rotated_string()

static void xtd::drawing::native::graphics::draw_rotated_string ( intptr  handle,
const xtd::string text,
intptr  font,
intptr  brush,
float  x,
float  y,
float  angle 
)
staticprotected

Draws the specified text string at the specified location with the specified brush, font and angle.

Parameters
handleThe graphics handle.
sString to draw.
fontA font handle that defines the text format of the string.
brushA brush handle that determines the color and texture of the drawn text.
xThe x-coordinate of the upper-left corner of the drawn text.
yThe y-coordinate of the upper-left corner of the drawn text.
angleThe angle, measured in degrees clockwise from the x-axis, of the text's orientation line.
Warning
Internal use only

◆ draw_rounded_rectangle()

static void xtd::drawing::native::graphics::draw_rounded_rectangle ( intptr  handle,
intptr  pen,
float  x,
float  y,
float  width,
float  height,
float  radius 
)
staticprotected

Draws a rounded rectangle specified by a coordinate pair, a width, a height, and radius.

Parameters
handleThe graphics handle.
penA pen handle that determines the color, width, and style of the rounded rectangle.
xThe x-coordinate of the upper-left corner of the rounded rectangle to draw.
yThe y-coordinate of the upper-left corner of the rounded rectangle to draw.
widthThe width of the rounded rectangle to draw.
heightThe height of the rounded rectangle to draw.
radiusThe radius of the rounded rectange angles.
Warning
Internal use only

◆ draw_string() [1/2]

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

Draws the specified text string at the specified point with the specified brush and font handle using the formatting attributes of the format.

Parameters
handleThe graphics handle.
textString to draw.
fontA font handle that defines the text format of the string.
brushA brush handle that determines the color and texture of the drawn text.
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

◆ draw_string() [2/2]

static void xtd::drawing::native::graphics::draw_string ( intptr  handle,
const xtd::string text,
intptr  font,
intptr  brush,
float  x,
float  y,
float  width,
float  height,
int32  alignment,
int32  line_alignment,
int32  hot_key_prefix,
int32  trimming,
int32  string_formats 
)
staticprotected

Draws the specified text string at the specified rectangle with the specified brush and font handle using the formatting attributes of the format.

Parameters
handleThe graphics handle.
textString to draw.
fontA font handle that defines the text format of the string.
brushA brush handle that determines the color and texture of the drawn text.
xThe x-coordinate of the upper-left corner of the string.
yThe y-coordinate of the upper left corner of the string.
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).
no_wrapTrue if the text wrapping between lines when formatting within a rectangle is disabled; otherwise false.
Warning
Internal use only

◆ fill_closed_curve()

static void xtd::drawing::native::graphics::fill_closed_curve ( intptr  handle,
intptr  brush,
std::vector< xtd::collections::generic::key_value_pair< float, float > >  points,
uint32  fill_mode,
float  tension 
)
staticprotected

Fills the interior of a closed cardinal spline curve defined by an array of xtd::collections::generic::key_value_pair<float, float> structures.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that define the spline.
fill_modeA fill mode value that determines how the curve is filled (see fill_modes.h for more information).
tensionValue greater than or equal to 0.0F that specifies the tension of the curve.
Warning
Internal use only

◆ fill_ellipse()

static void xtd::drawing::native::graphics::fill_ellipse ( intptr  handle,
intptr  brush,
float  x,
float  y,
float  width,
float  heigh 
)
staticprotected

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
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.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
Warning
Internal use only

◆ fill_path()

static void xtd::drawing::native::graphics::fill_path ( intptr  handle,
intptr  brush,
intptr  graphics_path,
int32  mode 
)
staticprotected

Fills the interior of a graphics path.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
pathA graphics path handle that represents the path to fill.
modeA fill mode value that specifies how the interiors of shapes in the graphics path are filled (see fill_modes.h for more information).
Warning
Internal use only

◆ fill_pie()

static void xtd::drawing::native::graphics::fill_pie ( intptr  handle,
intptr  brush,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)
staticprotected

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
Warning
Internal use only

◆ fill_polygon()

static void xtd::drawing::native::graphics::fill_polygon ( intptr  handle,
intptr  pen,
const std::vector< xtd::collections::generic::key_value_pair< float, float > > &  points,
int32  fill_mode 
)
staticprotected

Fills the interior of a polygon defined by an array of points specified by xtd::collections::generic::key_value_pair<float, float> structures using the specified fill mode.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
pointsArray of xtd::collections::generic::key_value_pair<float, float> structures that represent the vertices of the polygon to fill.
fill_modeMember of the fill mode value that determines the style of the fill (see fill_modes.h for more information).
Warning
Internal use only

◆ fill_rectangle()

static void xtd::drawing::native::graphics::fill_rectangle ( intptr  handle,
intptr  brush,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rectangle to fill.
yThe y-coordinate of the upper-left corner of the rectangle to fill.
widthWidth of the rectangle to fill.
heightHeight of the rectangle to fill.
Warning
Internal use only

◆ fill_rectangles()

static void xtd::drawing::native::graphics::fill_rectangles ( intptr  handle,
intptr  brush,
std::vector< std::tuple< float, float, float, float > > &  rects 
)
staticprotected

Fills the interiors of a series of rectangles specified by std::tuple<float, float, float, float> structures.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
rectsArray of std::tuple<float, float, float, float> structures that represent the rectangles to fill.
Warning
Internal use only

◆ fill_region()

static void xtd::drawing::native::graphics::fill_region ( intptr  handle,
intptr  brush,
intptr  region 
)
staticprotected

Fills the interior of a region.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
regionA region handle that represents the area to fill.
Warning
Internal use only

◆ fill_rounded_rectangle()

static void xtd::drawing::native::graphics::fill_rounded_rectangle ( intptr  handle,
intptr  brush,
float  x,
float  y,
float  width,
float  height,
float  radius 
)
staticprotected

Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius.

Parameters
handleThe graphics handle.
brushA brush handle that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rounded rectangle to fill.
yThe y-coordinate of the upper-left corner of the rounded rectangle to fill.
widthWidth of the rounded rectangle to fill.
heightHeight of the rounded rectangle to fill.
radiusThe radius of the rounded rectange angles.
Warning
Internal use only

◆ flush()

static void xtd::drawing::native::graphics::flush ( intptr  handle,
int32  intention 
)
staticprotected

Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish.

Parameters
handleThe graphics handle.
intentionA flush intention value that specifies whether the method returns immediately or waits for any existing operations to finish (see flush_intentions.h for more information).
Warning
Internal use only

◆ from_hdc() [1/2]

static intptr xtd::drawing::native::graphics::from_hdc ( intptr  hdc)
staticprotected

Creates a new graphics from the specified handle to a device context.

Parameters
hdcHandle to a device context.
Returns
This method returns a new graphics handle for the specified device context.
Warning
Internal use only

◆ from_hdc() [2/2]

static intptr xtd::drawing::native::graphics::from_hdc ( intptr  hdc,
intptr  hdevice 
)
staticprotected

Creates a new graphics from the specified handle to a device contextand handle to a device.

Parameters
hdcHandle to a device context.
hdeviceHandle to a device.
Returns
This method returns a new graphics handle for the specified device context and device.
Warning
Internal use only

◆ from_hwnd()

static intptr xtd::drawing::native::graphics::from_hwnd ( intptr  hwnd)
staticprotected

Creates a new graphics from the specified handle to a window.

Parameters
hwndHandle to a window.
Returns
This method returns a new graphics handle for the specified window handle.
Warning
Internal use only

◆ from_image()

static intptr xtd::drawing::native::graphics::from_image ( intptr  image)
staticprotected

Creates a new graphics from the specified image.

Parameters
imageimage from which to create the new graphics.
Returns
This method returns a new graphics handle for the specified Image.
Warning
Internal use only

◆ get_dpi_x()

static float xtd::drawing::native::graphics::get_dpi_x ( intptr  handle)
staticprotected

Gets the horizontal resolution of this graphics.

Parameters
handleThe graphics handle.
Returns
The value, in dots per inch, for the horizontal resolution supported by this graphics.
Warning
Internal use only

◆ get_dpi_y()

static float xtd::drawing::native::graphics::get_dpi_y ( intptr  handle)
staticprotected

Gets the vertical resolution of this graphics.

Parameters
handleThe graphics handle.
Returns
The value, in dots per inch, for the vertical resolution supported by this graphics.
Warning
Internal use only

◆ get_hdc()

static intptr xtd::drawing::native::graphics::get_hdc ( intptr  handle)
staticprotected

Gets the handle to the device context associated with this graphics.

Parameters
handleThe graphics handle.
Returns
Handle to the device context associated with this graphics.
Warning
Internal use only

◆ get_nearest_color()

static void xtd::drawing::native::graphics::get_nearest_color ( intptr  handle,
xtd::byte  original_a,
xtd::byte  original_r,
xtd::byte  original_g,
xtd::byte  original_b,
xtd::byte nearest_a,
xtd::byte nearest_r,
xtd::byte nearest_g,
xtd::byte nearest_b 
)
staticprotected

Gets the nearest color to the specified color.

Parameters
handleThe graphics handle.
original_aThe alpha component of color for which to find a match.
original_rThe red component of color for which to find a match.
original_gThe green component of color for which to find a match.
original_bThe blue component of color for which to find a match.
nearest_aThe alpha component of color that represents the nearest color to the one specified with the color parameter.
nearest_rThe red component of color that represents the nearest color to the one specified with the color parameter.
nearest_gThe green component of color that represents the nearest color to the one specified with the color parameter.
nearest_bThe blue component of color that represents the nearest color to the one specified with the color parameter.
Warning
Internal use only

◆ interpolation_mode()

static void xtd::drawing::native::graphics::interpolation_mode ( intptr  handle,
int32  interpolation_mode 
)
staticprotected

Sets the interpolation mode associated with the graphics.

Parameters
handleThe graphics handle.
interpolation_modeAn interpolation mode value (see interpolation_modes.h for more information).
Warning
Internal use only

◆ pixel_offset_mode()

static void xtd::drawing::native::graphics::pixel_offset_mode ( intptr  handle,
int32  pixel_offst_mode 
)
staticprotected

Sets a value specifying how pixels are offset during rendering of this graphics.

Parameters
handleThe graphics handle.
pixel_offst_modeThis property specifies a pixel offset mode value (see pixel_offst_modes.h for more information).
Warning
Internal use only

◆ measure_string()

static void xtd::drawing::native::graphics::measure_string ( intptr  handle,
const xtd::string text,
intptr  font,
float &  width,
float &  height,
float  max_width,
float  max_height,
int32  alignment,
int32  line_alignment,
int32  hot_key_prefix,
int32  trimming,
size_t  characters_fitted,
size_t  lines_filled,
bool  measure_trailing_spaces 
)
staticprotected

Measures the specified string when drawn with the specified font and formatted with the specified format.

Parameters
handleThe graphics handle.
textxtd::string to measure.
fontA font handle that defines the text format of the string.
widthThe width of the text.
heightThe height of the text.
max_widthThe maximum width of the text.
max_heightThe maximum 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).
characters_fittedNumber of characters in the string.
lines_filledNumber of text lines in the string.
Warning
Internal use only

◆ release_hdc()

static void xtd::drawing::native::graphics::release_hdc ( intptr  handle,
intptr  hdc 
)
staticprotected

Releases a device context handle obtained by a previous call to the xtd::drawing::native::graphics::get_hdc() method of the graphics.

Parameters
handleThe graphics handle.
hdcHandle to a device context obtained by a previous call to the xtd::drawing::native::graphics::get_hdc() method of the graphics.
Warning
Internal use only

◆ reset_transform()

static void xtd::drawing::native::graphics::reset_transform ( intptr  handle)
staticprotected

Resets the world transformation matrix of the graphics to the identity matrix.

Parameters
handleThe graphics handle.
Warning
Internal use only

◆ restore()

static void xtd::drawing::native::graphics::restore ( intptr  handle,
intptr gstate 
)
staticprotected

Restores the state of the graphics to the state represented by a graphics state.

Parameters
handleThe graphics handle.
gstateA graphics state handle that represents the state to which to restore the graphics.
Warning
Internal use only

◆ rotate_transform()

static void xtd::drawing::native::graphics::rotate_transform ( intptr  handle,
float  angle,
int32  order 
)
staticprotected

Applies the specified rotation to the transformation matrix of the graphics in the specified order.

Parameters
handleThe graphics handle.
angleAngle of rotation in degrees.
orderA matrix order value that specifies whether the rotation is prepended or appended to the transformation matrix (see matrix_orders.h for more information).
Warning
Internal use only

◆ save()

static intptr xtd::drawing::native::graphics::save ( intptr  handle)
staticprotected

Saves the current state of the graphics and identifies the saved state with a graphics state.

Parameters
handleThe graphics handle.
Returns
This method returns a graphics state handle that represents the saved state of the graphics.
Warning
Internal use only

◆ scale_transform()

static void xtd::drawing::native::graphics::scale_transform ( intptr  handle,
float  sx,
float  sy,
int32  order 
)
staticprotected

Applies the specified scaling operation to the transformation matrix of the graphics in the specified order.

Parameters
handleThe graphics handle.
sxScale factor in the x direction.
syScale factor in the y direction.
orderA matrix order value that specifies whether the scaling operation is prepended or appended to the transformation matrix (see matrix_orders.h for more information).
Warning
Internal use only

◆ smoothing_mode()

static void xtd::drawing::native::graphics::smoothing_mode ( intptr  handle,
int32  smoothing_mode 
)
staticprotected

Sets the rendering quality for the graphics.

Parameters
handleThe graphics handle.
smoothing_modeA smoothing mode value (see smoothing_modes.h for more information).
Warning
Internal use only

◆ text_contrast()

static void xtd::drawing::native::graphics::text_contrast ( intptr  handle,
int32  text_contrast 
)
staticprotected

Sets the gamma correction value for rendering text.

Parameters
handleThe graphics handle.
text_contrastThe gamma correction value used for rendering antialiased and ClearType text.
Remarks
The gamma correction value must be between 0 and 12. The default value is 4.
Warning
Internal use only

◆ text_rendering_hint()

static void xtd::drawing::native::graphics::text_rendering_hint ( intptr  handle,
int32  text_rendering_hint 
)
staticprotected

Sets the rendering mode for text associated with the graphics.

Parameters
handleThe graphics handle.
text_rendering_hintA text rendering hint value (see text_rendering_hints.h for more information).
Warning
Internal use only

◆ transform() [1/2]

static intptr xtd::drawing::native::graphics::transform ( intptr  handle)
staticprotected

Gets a copy of the geometric world transformation for the graphics.

Parameters
handleThe graphics handle.
Returns
A matrix handle that represents the geometric world transformation for the graphics.
Warning
Internal use only

◆ transform() [2/2]

static void xtd::drawing::native::graphics::transform ( intptr  handle,
intptr  matrix 
)
staticprotected

Sets a copy of the geometric world transformation for the graphics.

Parameters
handleThe graphics handle.
valueA matrix handle that represents the geometric world transformation for the graphics.
Warning
Internal use only

◆ translate_transform()

static void xtd::drawing::native::graphics::translate_transform ( intptr  handle,
float  dx,
float  dy,
int32  order 
)
staticprotected

Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of the graphics in the specified order.

Parameters
handleThe graphics handle.
dxThe x-coordinate of the translation.
dyThe y-coordinate of the translation.
orderA matrix order value that specifies whether the translation is prepended or appended to the transformation matrix (see matrix_orders.h for more information).
Warning
Internal use only

◆ trim_string()

static xtd::string xtd::drawing::native::graphics::trim_string ( intptr  handle,
const xtd::string text,
intptr  font,
float  width,
int32  trimming 
)
staticprotected

Trims the specified string for a specified width with the specified font and trimming.

Parameters
handleThe graphics handle.
textxtd::string to measure.
fontA font handle that defines the text format of the string.
widthThe width of the text.
trimmingThe trimming value for the text (see string_trimmings.h for more information).
Warning
Internal use only

◆ visible_clip_bounds()

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

Gets the bounding rectangle of the visible clipping region of the graphics.

Parameters
handleThe graphics handle.
xThe x-coordinate of the upper-left corner of the bounding rectangle for the visible clipping region of the graphics.
yThe y-coordinate of the upper-left corner of the bounding rectangle for the visible clipping region of the graphics.
widthWidth of the bounding rectangle for the visible clipping region of the graphics.
heightHeight of the bounding rectangle for the visible clipping region of the graphics.
Warning
Internal use only

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