xtd - Reference Guide 0.2.0
xtd::drawing::graphics Class Reference

#include <graphics.h>

## Definition

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

class drawing_export_ graphics : public xtd::object
Inheritance
xtd::objectxtd::drawing::graphics
Namespace
xtd::drawing
Library
xtd.drawing
Examples:
colored_tab_pages.cpp, and fill_rectangle.cpp.

## Properties

xtd::drawing::region clip () const
Gets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics. More...

graphicsclip (const xtd::drawing::region value)
Sets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics. More...

xtd::drawing::rectangle_f clip_bounds () const
Gets a xtd::drawing::rectangle_f structure that bounds the clipping region of this xtd::drawing::graphics. More...

xtd::drawing::drawing2d::compositing_mode compositing_mode () const
Gets a value that specifies how composited images are drawn to this xtd::drawing::graphics. More...

graphicscompositing_mode (xtd::drawing::drawing2d::compositing_mode value)
Sets a value that specifies how composited images are drawn to this xtd::drawing::graphics. More...

xtd::drawing::drawing2d::compositing_quality compositing_quality () const
Gets the rendering quality of composited images drawn to this xtd::drawing::graphics. More...

graphicscompositing_quality (xtd::drawing::drawing2d::compositing_quality value)
Sets the rendering quality of composited images drawn to this xtd::drawing::graphics. More...

float dpi_x () const
Gets the horizontal resolution of this xtd::drawing::graphics. More...

float dpi_y () const
Gets the vertical resolution of this xtd::drawing::graphics. More...

intptr_t handle () const
Gets the handle device context that the graphics is bound to. More...

xtd::drawing::drawing2d::interpolation_mode interpolation_mode () const
Gets the interpolation mode associated with this xtd::drawing::graphics. More...

graphicsinterpolation_mode (xtd::drawing::drawing2d::interpolation_mode value)
Sets the interpolation mode associated with this xtd::drawing::graphics. More...

float page_scale () const
Gets the scaling between world units and page units for this xtd::drawing::graphics. More...

graphicspage_scale (float value)
Sets the scaling between world units and page units for this xtd::drawing::graphics. More...

xtd::drawing::graphics_unit page_unit () const
Gets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics. More...

graphicspage_unit (xtd::drawing::graphics_unit value)
Sets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics. More...

xtd::drawing::drawing2d::pixel_offset_mode pixel_offset_mode () const
Gets a value specifying how pixels are offset during rendering of this xtd::drawing::graphics. More...

graphicspixel_offset_mode (xtd::drawing::drawing2d::pixel_offset_mode value)
Sets a value specifying how pixels are offset during rendering of this xtd::drawing::graphics. More...

xtd::drawing::drawing2d::smoothing_mode smoothing_mode () const
Gets the rendering quality for this xtd::drawing::graphics. More...

graphicssmoothing_mode (xtd::drawing::drawing2d::smoothing_mode value)
Sets the rendering quality for this xtd::drawing::graphics. More...

int text_contrast () const
Gets the gamma correction value for rendering text. More...

graphicstext_contrast (int value)
Sets the gamma correction value for rendering text. More...

xtd::drawing::text::text_rendering_hint text_rendering_hint () const
Gets the rendering mode for text associated with this xtd::drawing::graphics. More...

graphicstext_rendering_hint (xtd::drawing::text::text_rendering_hint value)
Sets the rendering mode for text associated with this xtd::drawing::graphics. More...

xtd::drawing::drawing2d::matrix transform () const
Gets a copy of the geometric world transformation for this xtd::drawing::graphics. More...

graphicstransform (const xtd::drawing::drawing2d::matrix &value)
Sets a copy of the geometric world transformation for this xtd::drawing::graphics. More...

xtd::drawing::rectangle_f visible_clip_bounds () const noexcept
Gets the bounding rectangle of the visible clipping region of this xtd::drawing::graphics. More...

## Methods

void clear (const color &color)
Clears the entire drawing surface and fills it with the specified background color. More...

void copy_from_screen (const xtd::drawing::point &upper_left_source, const xtd::drawing::point &upper_left_destination, const xtd::drawing::size &block_region_size)
Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the xtd::drawing::graphics. More...

void copy_from_screen (const xtd::drawing::point &upper_left_source, const xtd::drawing::point &upper_left_destination, const xtd::drawing::size &block_region_size, xtd::drawing::copy_pixel_operation 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 xtd::drawing::graphics. More...

void copy_from_screen (int32_t source_x, int32_t source_y, int32_t destination_x, int32_t destination_y, const xtd::drawing::size &block_region_size)
Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the xtd::drawing::graphics. More...

void copy_from_screen (int32_t source_x, int32_t source_y, int32_t destination_x, int32_t destination_y, const xtd::drawing::size &block_region_size, xtd::drawing::copy_pixel_operation 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 xtd::drawing::graphics. More...

void draw_arc (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure. More...

void draw_arc (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure. More...

void draw_arc (const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle)
Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height. More...

void draw_arc (const xtd::drawing::pen &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. More...

void draw_bezier (const xtd::drawing::pen &pen, const xtd::drawing::point &pt1, const xtd::drawing::point &pt2, const xtd::drawing::point &pt3, const xtd::drawing::point &pt4)
Draws a Bézier spline defined by four Point structures. More...

void draw_bezier (const xtd::drawing::pen &pen, const xtd::drawing::point_f &pt1, const xtd::drawing::point_f &pt2, const xtd::drawing::point_f &pt3, const xtd::drawing::point_f &pt4)
Draws a Bézier spline defined by four Point structures. More...

void draw_bezier (const pen &pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, int32_t x4, int32_t y4)
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points. More...

void draw_bezier (const pen &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. More...

void draw_beziers (const pen &pen, const std::vector< xtd::drawing::point > &points)
Draws a series of Bézier splines from an array of xtd::drawing::point structures. More...

void draw_beziers (const pen &pen, const std::vector< xtd::drawing::point_f > &points)
Draws a series of Bézier splines from an array of xtd::drawing::point_f structures. More...

void draw_closed_curve (const pen &pen, const std::vector< xtd::drawing::point > &points)
Draws a closed cardinal spline defined by an array of xtd::drawing::point structures. More...

void draw_closed_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points)
Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures. More...

void draw_closed_curve (const pen &pen, const std::vector< xtd::drawing::point > &points, float tension)
Draws a closed cardinal spline defined by an array of xtd::drawing::point structures using a specified tension. More...

void draw_closed_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points, float tension)
Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures using a specified tension. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point > &points)
Draws a cardinal spline through a specified array of xtd::drawing::point structures. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points)
Draws a cardinal spline through a specified array of xtd::drawing::point_f structures. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point > &points, float tension)
Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points, float tension)
Draws a cardinal spline through a specified array of xtd::drawing::point_f structures using a specified tension. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point > &points, size_t offset, size_t number_of_segments)
Draws a cardinal spline through a specified array of xtd::drawing::point structures. The drawing begins offset from the beginning of the array. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points, size_t offset, size_t number_of_segments)
Draws a cardinal spline through a specified array of xtd::drawing::point_f structures. The drawing begins offset from the beginning of the array. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point > &points, size_t offset, size_t number_of_segments, float tension)
Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. The drawing begins offset from the beginning of the array. More...

void draw_curve (const pen &pen, const std::vector< xtd::drawing::point_f > &points, size_t offset, size_t number_of_segments, float tension)
Draws a cardinal spline through a specified array of xtd::drawing::point_f structures using a specified tension. The drawing begins offset from the beginning of the array. More...

void draw_ellipse (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect)
Draws an ellipse specified by a bounding xtd::drawing::rectangle structure. More...

void draw_ellipse (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect)
Draws an ellipse specified by a bounding xtd::drawing::rectangle_f structure. More...

void draw_ellipse (const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height)
Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width. More...

void draw_ellipse (const xtd::drawing::pen &pen, float x, float y, float width, float height)
Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width. More...

void draw_icon (const xtd::drawing::icon &icon, int32_t x, int32_t y)
Draws the image represented by the specified xtd::drawing::icon at the specified coordinates. More...

void draw_icon (const xtd::drawing::icon &icon, const xtd::drawing::rectangle &rect)
Draws the image represented by the specified xtd::drawing::icon within the area specified by a xtd::drawing::rectangle structure. More...

void draw_icon_unstretched (const xtd::drawing::icon &icon, const xtd::drawing::rectangle &rect)
Draws the image represented by the specified Icon without scaling the image. More...

void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect)
Draws the specified xtd::drawing::image at the specified location and with the specified size. More...

void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &rect)
Draws the specified xtd::drawing::image at the specified location and with the specified size. More...

void draw_image (const xtd::drawing::image &image, const xtd::drawing::point &point)
Draws the specified xtd::drawing::image, using its original physical size, at the specified location. More...

void draw_image (const xtd::drawing::image &image, const xtd::drawing::point_f &point)
Draws the specified xtd::drawing::image, using its original physical size, at the specified location. More...

void draw_image (const xtd::drawing::image &image, int32_t x, int32_t y, int32_t width, int32_t height)
Draws the specified xtd::drawing::image at the specified location and with the specified size. More...

void draw_image (const xtd::drawing::image &image, float x, float y, float width, float height)
Draws the specified xtd::drawing::image at the specified location and with the specified size. More...

void draw_image (const xtd::drawing::image &image, int32_t x, int32_t y)
Draws the specified xtd::drawing::image, using its original physical size, at the specified location. More...

void draw_image (const xtd::drawing::image &image, float x, float y)
Draws the specified xtd::drawing::image, using its original physical size, at the specified location. More...

void draw_image_unscaled (const xtd::drawing::image &image, const xtd::drawing::point &point)
Draws a specified image using its original physical size at a specified location. More...

void draw_image_unscaled (const xtd::drawing::image &image, int32_t x, int32_t y)
Draws a specified image using its original physical size at a specified location. More...

void draw_image_unscaled (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect)
Draws a specified image using its original physical size at a specified location. More...

void draw_image_unscaled (const xtd::drawing::image &image, int32_t x, int32_t y, int32_t width, int32_t height)
Draws a specified image using its original physical size at a specified location. More...

void draw_image_unscaled_and_clipped (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect)
Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle. More...

void draw_line (const xtd::drawing::pen &pen, const xtd::drawing::point &pt1, const point &pt2)
Draws a line connecting two xtd::drawing::point structures. More...

void draw_line (const xtd::drawing::pen &pen, const xtd::drawing::point_f &pt1, const point_f &pt2)
Draws a line connecting two xtd::drawing::point_f structures. More...

void draw_line (const xtd::drawing::pen &pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
Draws a line connecting the two points specified by the coordinate pairs. More...

void draw_line (const xtd::drawing::pen &pen, float x1, float y1, float x2, float y2)
Draws a line connecting the two points specified by the coordinate pairs. More...

void draw_lines (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::point > &points)
Draws a series of line segments that connect an array of xtd::drawing::point structures. More...

void draw_lines (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::point_f > &points)
Draws a series of line segments that connect an array of xtd::drawing::point_f structures. More...

void draw_path (const xtd::drawing::pen &pen, const xtd::drawing::drawing2d::graphics_path &path)
Draws a xtd::drawing::drawing2d::graphics_path. More...

void draw_pie (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines. More...

void draw_pie (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines. More...

void draw_pie (const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle)
Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines. More...

void draw_pie (const xtd::drawing::pen &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. More...

void draw_polygon (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::point > &points)
Draws a polygon defined by an array of xtd::drawing::point structures. More...

void draw_polygon (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::point_f > &points)
Draws a polygon defined by an array of xtd::drawing::point_f structures. More...

void draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point &point)
Draws a point specified by the coordinate pairs. More...

void draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point_f &point)
Draws a point specified by the coordinate pairs. More...

void draw_point (const xtd::drawing::pen &pen, int32_t x, int32_t y)
Draws a point specified by the coordinate pairs. More...

void draw_point (const xtd::drawing::pen &pen, float x, float y)
Draws a point specified by the coordinate pairs. More...

void draw_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect)
Draws a rectangle specified by a xtd::drawing::rectangle structure. More...

void draw_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect)
Draws a rectangle specified by a xtd::drawing::rectangle_f structure. More...

void draw_rectangle (const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height)
Draws a rectangle specified by a coordinate pair, a width, and a height. More...

void draw_rectangle (const xtd::drawing::pen &pen, float x, float y, float width, float height)
Draws a rectangle specified by a coordinate pair, a width, and a height. More...

void draw_rectangles (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::rectangle > &rects)
Draws a series of rectangles specified by xtd::drawing::rectangle structures. More...

void draw_rectangles (const xtd::drawing::pen &pen, const std::vector< xtd::drawing::rectangle_f > &rects)
Draws a series of rectangles specified by xtd::drawing::rectangle_f structures. More...

void draw_rotated_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::point_f &point, float angle)
Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle. More...

void draw_rotated_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, float x, float y, float angle)
Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle. More...

void draw_rounded_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, int32_t radius)
Draws a rounded rectangle specified by a xtd::drawing::rectangle structure, and radius. More...

void draw_rounded_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float radius)
Draws a rounded rectangle specified by a xtd::drawing::rectangle_f structure, and radius. More...

void draw_rounded_rectangle (const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius)
Draws a rounded rectangle specified by a coordinate pair, a width, and a height, and radius. More...

void draw_rounded_rectangle (const xtd::drawing::pen &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. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &layout_rectangle)
Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &layout_rectangle, const xtd::drawing::string_format &format)
Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::point_f &point)
Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::point_f &point, const xtd::drawing::string_format &format)
Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, float x, float y)
Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects. More...

void draw_string (const xtd::ustring &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, float x, float y, const xtd::drawing::string_format &format)
Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format. More...

void exclude_clip (const xtd::drawing::region &region)
Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::region. More...

void exclude_clip (const xtd::drawing::rectangle &rect)
Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle. More...

void exclude_clip (const xtd::drawing::rectangle_f &rect)
Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle_f. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing2d::fill_mode fill_mode)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures using the specified fill mode. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing2d::fill_mode fill_mode)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures using the specified fill mode. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing2d::fill_mode fill_mode, float tension)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures using the specified fill mode and tension. More...

void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing2d::fill_mode fill_mode, float tension)
Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures using the specified fill mode and tension. More...

void fill_ellipse (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect)
Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle structure. More...

void fill_ellipse (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect)
Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle_f structure. More...

void fill_ellipse (const xtd::drawing::brush &brush, int32_t x, int32_t y, int32_t width, int32_t height)
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height. More...

void fill_ellipse (const xtd::drawing::brush &brush, float x, float y, float width, float height)
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height. More...

void fill_path (const xtd::drawing::brush &brush, const xtd::drawing::drawing2d::graphics_path &path)
Fills the interior of a xtd::drawing::drawing2d::graphics_path. More...

void fill_pie (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines. More...

void fill_pie (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines. More...

void fill_pie (const xtd::drawing::brush &brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t 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. More...

void fill_pie (const xtd::drawing::brush &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. More...

void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points)
Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures. More...

void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points)
Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures. More...

void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing2d::fill_mode fill_mode)
Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures using the specified fill mode. More...

void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing2d::fill_mode fill_mode)
Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures using the specified fill mode. More...

void fill_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect)
Fills the interior of a rectangle specified by a xtd::drawing::rectangle structure. More...

void fill_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect)
Fills the interior of a rectangle specified by a xtd::drawing::rectangle_f structure. More...

void fill_rectangle (const xtd::drawing::brush &brush, int32_t x, int32_t y, int32_t width, int32_t height)
Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height. More...

void fill_rectangle (const xtd::drawing::brush &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. More...

void fill_rectangles (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::rectangle > &rects)
Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle structures. More...

void fill_rectangles (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::rectangle_f > &rects)
Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle_f structures. More...

void fill_region (const xtd::drawing::brush &brush, const xtd::drawing::region &region)
Fills the interior of a xtd::drawing::region. More...

void fill_rounded_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect, int32_t radius)
Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle structure. More...

void fill_rounded_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect, float radius)
Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle_f structure. More...

void fill_rounded_rectangle (const xtd::drawing::brush &brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius)
Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius. More...

void fill_rounded_rectangle (const xtd::drawing::brush &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. More...

void flush ()
Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish. More...

void flush (xtd::drawing::drawing2d::flush_intention intention)
Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish. More...

intptr_t get_hdc () const
Gets the handle to the device context associated with this xtd::drawing::graphics. More...

xtd::drawing::color get_nearest_color (const xtd::drawing::color &color) const
Gets the nearest color to the specified xtd::drawing::color structure. More...

void intersect_clip (const xtd::drawing::region &region)
Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::region. More...

void intersect_clip (const xtd::drawing::rectangle &rect)
Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::rectangle structure. More...

void intersect_clip (const xtd::drawing::rectangle_f &rect)
Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::rectangle_f structure. More...

bool is_visible (const xtd::drawing::rectangle &rect)
Indicates whether the rectangle specified by a xtd::drawing::rectangle structure is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (const xtd::drawing::rectangle_f &rect)
Indicates whether the rectangle specified by a xtd::drawing::rectangle_f structure is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (int32_t x, int32_t y, int32_t width, int32_t height)
Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (float x, float y, float width, float height)
Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (const xtd::drawing::point &point)
ndicates whether the specified xtd::drawing::point structure is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (const xtd::drawing::point_f &point)
ndicates whether the specified xtd::drawing::point_f structure is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (int32_t x, int32_t y)
Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics. More...

bool is_visible (float x, float y)
Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font)
Measures the specified string when drawn with the specified xtd::drawing::font. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area)
Measures the specified string when drawn with the specified xtd::drawing::font within the specified layout area. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, int32_t width)
Measures the specified string when drawn with the specified xtd::drawing::font. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::point_f &origin, const xtd::drawing::string_format &format)
Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area, const xtd::drawing::string_format &format)
Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, int32_t width, const xtd::drawing::string_format &format)
Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format. More...

size_f measure_string (const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area, const xtd::drawing::string_format &format, size_t characters_fitted, size_t lines_filled)
Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format. More...

void multiply_transform (const xtd::drawing::drawing2d::matrix &matrix)
Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing2d::matrix. More...

void multiply_transform (const xtd::drawing::drawing2d::matrix &matrix, xtd::drawing::drawing2d::matrix_order order)
Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing2d::matrix with specified order. More...

void release_hdc (intptr_t hdc)
Releases a device context handle obtained by a previous call to the xtd::drawing::graphics::get_hdc() method of this xtd::drawing::graphics. More...

void reset_clip ()
Resets the clip region of this xtd::drawing::graphics to an infinite region. More...

void reset_transform ()
Resets the world transformation matrix of this xtd::drawing::graphics to the identity matrix. More...

void restore (const xtd::drawing::drawing2d::graphics_state &gstate)
Restores the state of this xtd::drawing::graphics to the state represented by a xtd::drawing::drawing2d::graphics_state. More...

void rotate_transform (float angle)
Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics. More...

void rotate_transform (float angle, xtd::drawing::drawing2d::matrix_order order)
Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics in the specified order. More...

xtd::drawing::drawing2d::graphics_state save ()
Saves the current state of this xtd::drawing::graphics and identifies the saved state with a xtd::drawing::drawing2d::graphics_state. More...

void scale_transform (float sx, float sy)
Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics by prepending it to the object's transformation matrix. More...

void scale_transform (float sx, float sy, xtd::drawing::drawing2d::matrix_order order)
Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics in the specified order. More...

void translate_clip (int32_t dx, int32_t dy)
Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions. More...

void translate_clip (float dx, float dy)
Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions. More...

void translate_transform (float dx, float dy)
Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this xtd::drawing::graphics. More...

void translate_transform (float dx, float dy, xtd::drawing::drawing2d::matrix_order order)
Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this xtd::drawing::graphics in the specified order. More...

xtd::ustring trim_string (const xtd::ustring &text, const xtd::drawing::font &font, float width, xtd::drawing::string_trimming trimming)
Trims the specified string for a specified width with the specified xtd::drawing::font and with the specified xtd::drawing::string_trimming. More...

xtd::ustring to_string () const noexcept override
Returns a sxd::ustring that represents the current object. More...

static graphics from_hdc (intptr_t hdc)
Creates a new xtd::drawing::graphics from the specified handle to a device context. More...

static graphics from_hdc (intptr_t hdc, intptr_t hdevice)
Creates a new xtd::drawing::graphics from the specified handle to a device contextand handle to a device. More...

static graphics from_hwnd (intptr_t hwnd)
Creates a new xtd::drawing::graphics from the specified handle to a window. More...

static graphics from_image (const xtd::drawing::image &image)
Creates a new xtd::drawing::graphics from the specified xtd::drawing::image. More...

Public Member Functions inherited from xtd::object
object ()=default
Create a new instance of the ultimate base class object. More...

virtual bool equals (const object &obj) const noexcept
Determines whether the specified object is equal to the current object. More...

virtual size_t get_hash_code () const noexcept
Serves as a hash function for a particular type. More...

template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
Gets the type of the current instance. More...

Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
Determines whether the specified object instances are considered equal. More...

static bool reference_equals (const object &object_a, const object &object_b) noexcept
Determines whether the specified object instances are the same instance. More...

## ◆ clear()

 void xtd::drawing::graphics::clear ( const color & color )

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

Parameters
 color xtd::drawing::color structure that represents the background color of the drawing surface.

## ◆ clip() [1/2]

 xtd::drawing::region xtd::drawing::graphics::clip ( ) const

Gets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics.

Returns
A xtd::drawing::region that limits the portion of this xtd::drawing::graphics that is currently available for drawing.
Remarks
Modifying the xtd::drawing::region object returned by the xtd::drawing::graphics::clip property does not affect subsequent drawing with the xtd::drawing::graphics object. To change the clip region, replace the xtd::drawing::graphics::clip property value with a new xtd::drawing::region object. To determine whether the clipping region is infinite, retrieve the xtd::drawing::graphics::clip property and call its xtd::drawing::region::is_infinite method.

## ◆ clip() [2/2]

 graphics& xtd::drawing::graphics::clip ( const xtd::drawing::region value )

Sets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics.

Parameters
 value A xtd::drawing::region that limits the portion of this xtd::drawing::graphics that is currently available for drawing.
Returns
This current instance.
Remarks
Modifying the xtd::drawing::region object returned by the xtd::drawing::graphics::clip property does not affect subsequent drawing with the xtd::drawing::graphics object. To change the clip region, replace the xtd::drawing::graphics::clip property value with a new xtd::drawing::region object. To determine whether the clipping region is infinite, retrieve the xtd::drawing::graphics::clip property and call its xtd::drawing::region::is_infinite method.

## ◆ clip_bounds()

 xtd::drawing::rectangle_f xtd::drawing::graphics::clip_bounds ( ) const

Gets a xtd::drawing::rectangle_f structure that bounds the clipping region of this xtd::drawing::graphics.

Returns
A xtd::drawing::rectangle_f structure that represents a bounding rectangle for the clipping region of this xtd::drawing::graphics.
Remarks
The unit for resulting rectangle is designated by the xtd::drawing::graphics::page_unit property. The default unit is pixels. A xtd::drawing::graphics is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
If the clipping region is infinite, the xtd::drawing::graphics::clip_bounds property returns a meaningless large rectangle. To determine whether the clipping region is infinite, retrieve the xtd::drawing::graphics::clip property and call its xtd::drawing::region::is_infinite method.

## ◆ compositing_mode() [1/2]

 xtd::drawing::drawing2d::compositing_mode xtd::drawing::graphics::compositing_mode ( ) const

Gets a value that specifies how composited images are drawn to this xtd::drawing::graphics.

Returns
This property specifies a member of the xtd::drawing::drawing2d::compositing_mode enumeration. The default is xtd::drawing::drawing2d::compositing_mode::source_over.
Remarks
The compositing mode determines whether pixels from a source image overwrite or are combined with background pixels.
Note
You should not use a xtd::drawing::graphics::compositing_mode property value of xtd::drawing::graphics::source_copy when the xtd::drawing::graphics::text_rendering_hint property is set to xtd::drawing::graphics::text_rendering_hint::clear_type_grid_fit. An exception could occur or the image may not render correctly.

## ◆ compositing_mode() [2/2]

 graphics& xtd::drawing::graphics::compositing_mode ( xtd::drawing::drawing2d::compositing_mode value )

Sets a value that specifies how composited images are drawn to this xtd::drawing::graphics.

Parameters
 value This property specifies a member of the CompositingMode enumeration. The default is SourceOver.
Returns
This current instance.
Remarks
The compositing mode determines whether pixels from a source image overwrite or are combined with background pixels.
Note
You should not use a xtd::drawing::graphics::compositing_mode property value of xtd::drawing::graphics::source_copy when the xtd::drawing::graphics::text_rendering_hint property is set to xtd::drawing::graphics::text_rendering_hint::clear_type_grid_fit. An exception could occur or the image may not render correctly.

## ◆ compositing_quality() [1/2]

 xtd::drawing::drawing2d::compositing_quality xtd::drawing::graphics::compositing_quality ( ) const

Gets the rendering quality of composited images drawn to this xtd::drawing::graphics.

Returns
This property specifies a member of the xtd::drawing::drawing2d::compositing_quality enumeration. The xtd::drawing::drawing2d::compositing_quality::default_value is Default.
Remarks
The compositing quality determines the rendering quality level of composited images.

## ◆ compositing_quality() [2/2]

 graphics& xtd::drawing::graphics::compositing_quality ( xtd::drawing::drawing2d::compositing_quality value )

Sets the rendering quality of composited images drawn to this xtd::drawing::graphics.

Parameters
 value This property specifies a member of the xtd::drawing::drawing2d::compositing_quality enumeration. The xtd::drawing::drawing2d::compositing_quality::default_value is Default.
Returns
This current instance.
Remarks
The compositing quality determines the rendering quality level of composited images.

## ◆ copy_from_screen() [1/4]

 void xtd::drawing::graphics::copy_from_screen ( const xtd::drawing::point & upper_left_source, const xtd::drawing::point & upper_left_destination, const xtd::drawing::size & block_region_size )

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

Parameters
 upper_left_source The point at the upper-left corner of the source rectangle. upper_left_destination The point at the upper-left corner of the destination rectangle. block_region_size The size of the area to be transferred.
Remarks
The xtd::drawing::graphics::copy_from_screen methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the xtd::drawing::graphics::copy_from_screen methods that takes a xtd::drawing::graphics::copy_pixel_operation parameter.

## ◆ copy_from_screen() [2/4]

 void xtd::drawing::graphics::copy_from_screen ( const xtd::drawing::point & upper_left_source, const xtd::drawing::point & upper_left_destination, const xtd::drawing::size & block_region_size, xtd::drawing::copy_pixel_operation 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 xtd::drawing::graphics.

Parameters
 upper_left_source The point at the upper-left corner of the source rectangle. upper_left_destination The point at the upper-left corner of the destination rectangle. block_region_size The size of the area to be transferred. copy_pixel_operation One of the xtd::drawing::graphics::copy_pixel_operation values.
Remarks
The xtd::drawing::graphics::copy_from_screen methods are useful for layering one image on top of another. The xtd::drawing::copy_pixel_operation parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.

## ◆ copy_from_screen() [3/4]

 void xtd::drawing::graphics::copy_from_screen ( int32_t source_x, int32_t source_y, int32_t destination_x, int32_t destination_y, const xtd::drawing::size & block_region_size )

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

Parameters
 source_x The x-coordinate of the point at the upper-left corner of the source rectangle. source_y The y-coordinate of the point at the upper-left corner of the source rectangle. destination_x The x-coordinate of the point at the upper-left corner of the destination rectangle. destination_y The y-coordinate of the point at the upper-left corner of the destination rectangle. block_region_size The size of the area to be transferred.
Remarks
The xtd::drawing::graphics::copy_from_screen methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the xtd::drawing::graphics::copy_from_screen methods that takes a xtd::drawing::graphics::copy_pixel_operation parameter.

## ◆ copy_from_screen() [4/4]

 void xtd::drawing::graphics::copy_from_screen ( int32_t source_x, int32_t source_y, int32_t destination_x, int32_t destination_y, const xtd::drawing::size & block_region_size, xtd::drawing::copy_pixel_operation 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 xtd::drawing::graphics.

Parameters
 source_x The x-coordinate of the point at the upper-left corner of the source rectangle. source_y The y-coordinate of the point at the upper-left corner of the source rectangle. destination_x The x-coordinate of the point at the upper-left corner of the destination rectangle. destination_y The y-coordinate of the point at the upper-left corner of the destination rectangle. block_region_size The size of the area to be transferred. copy_pixel_operation One of the xtd::drawing::graphics::copy_pixel_operation values.
Remarks
The xtd::drawing::graphics::copy_from_screen methods are useful for layering one image on top of another. The xtd::drawing::copy_pixel_operation parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.

## ◆ dpi_x()

 float xtd::drawing::graphics::dpi_x ( ) const

Gets the horizontal resolution of this xtd::drawing::graphics.

Returns
The value, in dots per inch, for the horizontal resolution supported by this xtd::drawing::graphics.

## ◆ dpi_y()

 float xtd::drawing::graphics::dpi_y ( ) const

Gets the vertical resolution of this xtd::drawing::graphics.

Returns
The value, in dots per inch, for the vertical resolution supported by this xtd::drawing::graphics.

## ◆ draw_arc() [1/4]

 void xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle & rect, float start_angle, float sweep_angle )

Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the arc. rect xtd::drawing::rectangle structure that defines the boundaries of the ellipse. start_angle Angle in degrees measured clockwise from the x-axis to the starting point of the arc. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
Remarks
This method draws an arc that is a portion of the perimeter of an ellipse. The ellipse is defined by the boundaries of a rectangle. The arc is the portion of the perimeter of the ellipse between the start_angle parameter and the start_angle + sweep_angle parameters.

## ◆ draw_arc() [2/4]

 void xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle_f & rect, float start_angle, float sweep_angle )

Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the arc. rect xtd::drawing::rectangle_f structure that defines the boundaries of the ellipse. start_angle Angle in degrees measured clockwise from the x-axis to the starting point of the arc. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
Remarks
This method draws an arc that is a portion of the perimeter of an ellipse. The ellipse is defined by the boundaries of a rectangle. The arc is the portion of the perimeter of the ellipse between the start_angle parameter and the start_angle + sweep_angle parameters.

## ◆ draw_arc() [3/4]

 void xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle )

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

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the arc. x The x-coordinate of the upper-left corner of the rectangle that defines the ellipse. y The y-coordinate of the upper-left corner of the rectangle that defines the ellipse. width Width of the rectangle that defines the ellipse. height Height of the rectangle that defines the ellipse. start_angle Angle in degrees measured clockwise from the x-axis to the starting point of the arc. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
Remarks
This method draws an arc that is a portion of the perimeter of an ellipse. The ellipse is defined by the boundaries of a rectangle. The arc is the portion of the perimeter of the ellipse between the start_angle parameter and the start_angle + sweep_angle parameters.

## ◆ draw_arc() [4/4]

 void xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & 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.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the arc. x The x-coordinate of the upper-left corner of the rectangle that defines the ellipse. y The y-coordinate of the upper-left corner of the rectangle that defines the ellipse. width Width of the rectangle that defines the ellipse. height Height of the rectangle that defines the ellipse. start_angle Angle in degrees measured clockwise from the x-axis to the starting point of the arc. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
Remarks
This method draws an arc that is a portion of the perimeter of an ellipse. The ellipse is defined by the boundaries of a rectangle. The arc is the portion of the perimeter of the ellipse between the start_angle parameter and the start_angle + sweep_angle parameters.

## ◆ draw_bezier() [1/4]

 void xtd::drawing::graphics::draw_bezier ( const xtd::drawing::pen & pen, const xtd::drawing::point & pt1, const xtd::drawing::point & pt2, const xtd::drawing::point & pt3, const xtd::drawing::point & pt4 )

Draws a Bézier spline defined by four Point structures.

Parameters
 pen xtd::drawing::pen structure that determines the color, width, and style of the curve. pt1 xtd::drawing::point structure that represents the starting point of the curve. pt2 xtd::drawing::point structure that represents the first control point for the curve. pt3 xtd::drawing::point structure that represents the second control point for the curve. pt4 xtd::drawing::point structure that represents the ending point of the curve.
Remarks
The Bézier curve is drawn from the first point to the fourth point. The second and third points are control points that determine the shape of the curve.

## ◆ draw_bezier() [2/4]

 void xtd::drawing::graphics::draw_bezier ( const xtd::drawing::pen & pen, const xtd::drawing::point_f & pt1, const xtd::drawing::point_f & pt2, const xtd::drawing::point_f & pt3, const xtd::drawing::point_f & pt4 )

Draws a Bézier spline defined by four Point structures.

Parameters
 pen xtd::drawing::pen structure that determines the color, width, and style of the curve. pt1 xtd::drawing::point structure that represents the starting point of the curve. pt2 xtd::drawing::point structure that represents the first control point for the curve. pt3 xtd::drawing::point structure that represents the second control point for the curve. pt4 xtd::drawing::point structure that represents the ending point of the curve.
Remarks
The Bézier curve is drawn from the first point to the fourth point. The second and third points are control points that determine the shape of the curve.

## ◆ draw_bezier() [3/4]

 void xtd::drawing::graphics::draw_bezier ( const pen & pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, int32_t x4, int32_t y4 )

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

Parameters
 pen xtd::drawing::pen structure that determines the color, width, and style of the curve. 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 of the curve. y2 The y-coordinate of the first control point of the curve. x3 The x-coordinate of the second control point of the curve. y3 The y-coordinate of the second control point of the curve. x4 The x-coordinate of the ending point of the curve. y4 The y-coordinate of the ending point of the curve.
Remarks
The Bézier curve is drawn from the first point to the fourth point. The second and third points are control points that determine the shape of the curve.

## ◆ draw_bezier() [4/4]

 void xtd::drawing::graphics::draw_bezier ( const pen & 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.

Parameters
 pen xtd::drawing::pen structure that determines the color, width, and style of the curve. 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 of the curve. y2 The y-coordinate of the first control point of the curve. x3 The x-coordinate of the second control point of the curve. y3 The y-coordinate of the second control point of the curve. x4 The x-coordinate of the ending point of the curve. y4 The y-coordinate of the ending point of the curve.
Remarks
The Bézier curve is drawn from the first point to the fourth point. The second and third points are control points that determine the shape of the curve.

## ◆ draw_beziers() [1/2]

 void xtd::drawing::graphics::draw_beziers ( const pen & pen, const std::vector< xtd::drawing::point > & points )

Draws a series of Bézier splines from an array of xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point 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.
Remarks
The number of points in the array should be a multiple of 3 plus 1 because the first spline requires 4 points and any other splines require 3 points each. The first Bézier curve is drawn from the first point to the fourth point in the point array. The second and third points are control points that determine the shape of the curve. Each subsequent curve needs exactly three more points: two more control points and an ending point. The ending point of the previous curve is used as the starting point for each additional curve.

## ◆ draw_beziers() [2/2]

 void xtd::drawing::graphics::draw_beziers ( const pen & pen, const std::vector< xtd::drawing::point_f > & points )

Draws a series of Bézier splines from an array of xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f 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.
Remarks
The number of points in the array should be a multiple of 3 plus 1 because the first spline requires 4 points and any other splines require 3 points each. The first Bézier curve is drawn from the first point to the fourth point in the point array. The second and third points are control points that determine the shape of the curve. Each subsequent curve needs exactly three more points: two more control points and an ending point. The ending point of the previous curve is used as the starting point for each additional curve.

## ◆ draw_closed_curve() [1/4]

 void xtd::drawing::graphics::draw_closed_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points )

Draws a closed cardinal spline defined by an array of xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline.
Remarks
This method draws a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point structures.
This method uses a default tension of 0.0.

## ◆ draw_closed_curve() [2/4]

 void xtd::drawing::graphics::draw_closed_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points )

Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline.
Remarks
This method draws a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point_f structures.
This method uses a default tension of 0.0.

## ◆ draw_closed_curve() [3/4]

 void xtd::drawing::graphics::draw_closed_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points, float tension )

Draws a closed cardinal spline defined by an array of xtd::drawing::point structures using a specified tension.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline. tension alue greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point structures.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_closed_curve() [4/4]

 void xtd::drawing::graphics::draw_closed_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points, float tension )

Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures using a specified tension.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline. tension alue greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point_f structures.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_curve() [1/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points )

Draws a cardinal spline through a specified array of xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three PointF structures for a curve to be drawn.
This method uses a default tension of 0.0.

## ◆ draw_curve() [2/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points )

Draws a cardinal spline through a specified array of xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three PointF structures for a curve to be drawn.
This method uses a default tension of 0.0.

## ◆ draw_curve() [3/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points, float tension )

Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point structures for a curve to be drawn.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_curve() [4/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points, float tension )

Draws a cardinal spline through a specified array of xtd::drawing::point_f structures using a specified tension.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point_f structures for a curve to be drawn.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_curve() [5/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points, size_t offset, size_t number_of_segments )

Draws a cardinal spline through a specified array of xtd::drawing::point structures. The drawing begins offset from the beginning of the array.

Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline. offset Offset from the first element in the array of the points parameter to the starting point in the curve. number_of_segments Number of segments after the starting point to include in the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point structures for curve to be drawn.
The value of the offset parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
The value of the number_of_segments parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the number_of_segments parameter must be at least 1. The value of the offset parameter plus the value of the number_of_segments parameter must be less than the number of elements in the array of the points parameter.
This method uses a default tension of 0.0.

## ◆ draw_curve() [6/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points, size_t offset, size_t number_of_segments )

Draws a cardinal spline through a specified array of xtd::drawing::point_f structures. The drawing begins offset from the beginning of the array.

Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline. offset Offset from the first element in the array of the points parameter to the starting point in the curve. number_of_segments Number of segments after the starting point to include in the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point_f structures for curve to be drawn.
The value of the offset parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
The value of the number_of_segments parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the number_of_segments parameter must be at least 1. The value of the offset parameter plus the value of the number_of_segments parameter must be less than the number of elements in the array of the points parameter.
This method uses a default tension of 0.0.

## ◆ draw_curve() [7/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point > & points, size_t offset, size_t number_of_segments, float tension )

Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point structures that define the spline. offset Offset from the first element in the array of the points parameter to the starting point in the curve. number_of_segments Number of segments after the starting point to include in the curve. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point structures for curve to be drawn.
The value of the offset parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
The value of the number_of_segments parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the number_of_segments parameter must be at least 1. The value of the offset parameter plus the value of the number_of_segments parameter must be less than the number of elements in the array of the points parameter.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_curve() [8/8]

 void xtd::drawing::graphics::draw_curve ( const pen & pen, const std::vector< xtd::drawing::point_f > & points, size_t offset, size_t number_of_segments, float tension )

Draws a cardinal spline through a specified array of xtd::drawing::point_f structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the curve. points Array of xtd::drawing::point_f structures that define the spline. offset Offset from the first element in the array of the points parameter to the starting point in the curve. number_of_segments Number of segments after the starting point to include in the curve. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method draws a cardinal spline that passes through each point in the array.
The array of points must contain at least three xtd::drawing::point_f structures for curve to be drawn.
The value of the offset parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
The value of the number_of_segments parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the number_of_segments parameter must be at least 1. The value of the offset parameter plus the value of the number_of_segments parameter must be less than the number of elements in the array of the points parameter.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ draw_ellipse() [1/4]

 void xtd::drawing::graphics::draw_ellipse ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle & rect )

Draws an ellipse specified by a bounding xtd::drawing::rectangle structure.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the ellipse. rect xtd::drawing::rectangle structure that defines the boundaries of the ellipse.
Remarks
This method draws an ellipse that is defined by the bounding rectangle specified by the rect parameter.
Examples:
fill_rectangle.cpp.

## ◆ draw_ellipse() [2/4]

 void xtd::drawing::graphics::draw_ellipse ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle_f & rect )

Draws an ellipse specified by a bounding xtd::drawing::rectangle_f structure.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the ellipse. rect xtd::drawing::rectangle_f structure that defines the boundaries of the ellipse.
Remarks
This method draws an ellipse that is defined by the bounding rectangle specified by the rect parameter.

## ◆ draw_ellipse() [3/4]

 void xtd::drawing::graphics::draw_ellipse ( const xtd::drawing::pen & pen, int32_t x, int32_t y, int32_t width, int32_t height )

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
 pen xtd::drawing::pen that determines the color, width, and style of the ellipse. 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 Width of the bounding rectangle that defines the ellipse. height Height of the bounding rectangle that defines the ellipse.
Remarks
This method draws an ellipse that is defined by the bounding rectangle described by the x, y, width, and height parameters.

## ◆ draw_ellipse() [4/4]

 void xtd::drawing::graphics::draw_ellipse ( const xtd::drawing::pen & pen, float x, float y, float width, float height )

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
 pen xtd::drawing::pen that determines the color, width, and style of the ellipse. 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 Width of the bounding rectangle that defines the ellipse. height Height of the bounding rectangle that defines the ellipse.
Remarks
This method draws an ellipse that is defined by the bounding rectangle described by the x, y, width, and height parameters.

## ◆ draw_icon() [1/2]

 void xtd::drawing::graphics::draw_icon ( const xtd::drawing::icon & icon, int32_t x, int32_t y )

Draws the image represented by the specified xtd::drawing::icon at the specified coordinates.

Parameters
 icon xtd::drawing::icon to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image.

## ◆ draw_icon() [2/2]

 void xtd::drawing::graphics::draw_icon ( const xtd::drawing::icon & icon, const xtd::drawing::rectangle & rect )

Draws the image represented by the specified xtd::drawing::icon within the area specified by a xtd::drawing::rectangle structure.

Parameters
 icon xtd::drawing::icon to draw. rect xtd::drawing::rectangle structure that specifies the location and size of the resulting image on the display surface. The image contained in the icon parameter is scaled to the dimensions of this rectangular area.

## ◆ draw_icon_unstretched()

 void xtd::drawing::graphics::draw_icon_unstretched ( const xtd::drawing::icon & icon, const xtd::drawing::rectangle & rect )

Draws the image represented by the specified Icon without scaling the image.

Parameters
 icon xtd::drawing::icon to draw. rect xtd::drawing::rectangle structure that specifies the location and size of the resulting image. The image is not scaled to fit this rectangle, but retains its original size. If the image is larger than the rectangle, it is clipped to fit inside it.

## ◆ draw_image() [1/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, const xtd::drawing::rectangle & rect )

Draws the specified xtd::drawing::image at the specified location and with the specified size.

Parameters
 image xtd::drawing::image to draw. rect xtd::drawing::rectangle structure that specifies the location and size of the drawn image.
Remarks
The image represented by the image object is scaled to the dimensions of the rect rectangle.

## ◆ draw_image() [2/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, const xtd::drawing::rectangle_f & rect )

Draws the specified xtd::drawing::image at the specified location and with the specified size.

Parameters
 image xtd::drawing::image to draw. rect xtd::drawing::rectangle_f structure that specifies the location and size of the drawn image.
Remarks
The image represented by the image object is scaled to the dimensions of the rect rectangle.

## ◆ draw_image() [3/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, const xtd::drawing::point & point )

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

Parameters
 image xtd::drawing::image to draw. point xtd::drawing::point structure that represents the location of the upper-left corner of the drawn image.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image() [4/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, const xtd::drawing::point_f & point )

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

Parameters
 image xtd::drawing::image to draw. point xtd::drawing::point_f structure that represents the location of the upper-left corner of the drawn image.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image() [5/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, int32_t x, int32_t y, int32_t width, int32_t height )

Draws the specified xtd::drawing::image at the specified location and with the specified size.

Parameters
 image xtd::drawing::image to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image. width Width of the drawn image. height Height of the drawn image.
Remarks
The rectangle defined by the x, y, width, and height parameters determines the position and size of the drawn image.

## ◆ draw_image() [6/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, float x, float y, float width, float height )

Draws the specified xtd::drawing::image at the specified location and with the specified size.

Parameters
 image xtd::drawing::image to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image. width Width of the drawn image. height Height of the drawn image.
Remarks
The rectangle defined by the x, y, width, and height parameters determines the position and size of the drawn image.

## ◆ draw_image() [7/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, int32_t x, int32_t y )

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

Parameters
 image xtd::drawing::image to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image() [8/8]

 void xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image, float x, float y )

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

Parameters
 image xtd::drawing::image to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image_unscaled() [1/4]

 void xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image, const xtd::drawing::point & point )

Draws a specified image using its original physical size at a specified location.

Parameters
 image xtd::drawing::image to draw. point xtd::drawing::point structure that specifies the upper-left corner of the drawn image.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
The xtd::drawing::graphics::draw_image_unscaled method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call xtd::drawing::graphics::draw_image_unscaled to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image_unscaled() [2/4]

 void xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image, int32_t x, int32_t y )

Draws a specified image using its original physical size at a specified location.

Parameters
 x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image. image xtd::drawing::image to draw.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
The xtd::drawing::graphics::draw_image_unscaled method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call xtd::drawing::graphics::draw_image_unscaled to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image_unscaled() [3/4]

 void xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image, const xtd::drawing::rectangle & rect )

Draws a specified image using its original physical size at a specified location.

Parameters
 image xtd::drawing::image to draw. rect xtd::drawing::rectangle that specifies the upper-left corner of the drawn image. The xtd::drawing::rectangle::x and xtd::drawing::rectangle::y properties of the rectangle specify the upper-left corner. The xtd::drawing::rectangle::width and xtd::drawing::rectangle::height properties are ignored.
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
The xtd::drawing::graphics::draw_image_unscaled method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call xtd::drawing::graphics::draw_image_unscaled to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image_unscaled() [4/4]

 void xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image, int32_t x, int32_t y, int32_t width, int32_t height )

Draws a specified image using its original physical size at a specified location.

Parameters
 image xtd::drawing::image to draw. x The x-coordinate of the upper-left corner of the drawn image. y The y-coordinate of the upper-left corner of the drawn image. width not used. height not used
Remarks
An xtd::drawing::image stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
The xtd::drawing::graphics::draw_image_unscaled method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call xtd::drawing::graphics::draw_image_unscaled to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.

## ◆ draw_image_unscaled_and_clipped()

 void xtd::drawing::graphics::draw_image_unscaled_and_clipped ( const xtd::drawing::image & image, const xtd::drawing::rectangle & rect )

Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.

Parameters
 image xtd::drawing::image to draw. rect The xtd::drawing::rectangle in which to draw the image.

## ◆ draw_line() [1/4]

 void xtd::drawing::graphics::draw_line ( const xtd::drawing::pen & pen, const xtd::drawing::point & pt1, const point & pt2 )

Draws a line connecting two xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line. pt1 xtd::drawing::point structure that represents the first point to connect. pt2 xtd::drawing::point structure that represents the second point to connect.
Examples:
user_control.cpp.

## ◆ draw_line() [2/4]

 void xtd::drawing::graphics::draw_line ( const xtd::drawing::pen & pen, const xtd::drawing::point_f & pt1, const point_f & pt2 )

Draws a line connecting two xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line. pt1 xtd::drawing::point_f structure that represents the first point to connect. pt2 xtd::drawing::point_f structure that represents the second point to connect.

## ◆ draw_line() [3/4]

 void xtd::drawing::graphics::draw_line ( const xtd::drawing::pen & pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2 )

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

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line. x1 The x-coordinate of the first point. y1 The y-coordinate of the first point. x2 The x-coordinate of the second point. y2 The y-coordinate of the second point.
Remarks
This method draws a line connecting the two points specified by the x1, y1, x2, and y2 parameters.

## ◆ draw_line() [4/4]

 void xtd::drawing::graphics::draw_line ( const xtd::drawing::pen & pen, float x1, float y1, float x2, float y2 )

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

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line. x1 The x-coordinate of the first point. y1 The y-coordinate of the first point. x2 The x-coordinate of the second point. y2 The y-coordinate of the second point.
Remarks
This method draws a line connecting the two points specified by the x1, y1, x2, and y2 parameters.

## ◆ draw_lines() [1/2]

 void xtd::drawing::graphics::draw_lines ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::point > & points )

Draws a series of line segments that connect an array of xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line segments. points Array of xtd::drawing::point structures that represent the points to connect.
Remarks
This method draws a series of lines connecting an array of ending points. The first two points in the array specify the first line. Each additional point specifies the end of a line segment whose starting point is the ending point of the previous line segment.

## ◆ draw_lines() [2/2]

 void xtd::drawing::graphics::draw_lines ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::point_f > & points )

Draws a series of line segments that connect an array of xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the line segments. points Array of xtd::drawing::point_f structures that represent the points to connect.
Remarks
This method draws a series of lines connecting an array of ending points. The first two points in the array specify the first line. Each additional point specifies the end of a line segment whose starting point is the ending point of the previous line segment.

## ◆ draw_path()

 void xtd::drawing::graphics::draw_path ( const xtd::drawing::pen & pen, const xtd::drawing::drawing2d::graphics_path & path )
Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the path. path xtd::drawing::drawing2d::graphics_path to draw.
Remarks
The current transformation in the graphic context is applied to the xtd::drawing::drawing2d::graphics_path before it is drawn.

## ◆ draw_pie() [1/4]

 void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle & rect, float start_angle, float sweep_angle )

Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the pie shape. rect xtd::drawing::rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes. start_angle Angle measured in degrees clockwise from the x-axis to the first side of the pie shape. sweep_angle Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Remarks
This method draws a pie shape defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie shape consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ draw_pie() [2/4]

 void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle_f & rect, float start_angle, float sweep_angle )

Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the pie shape. rect xtd::drawing::rectangle_f structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes. start_angle Angle measured in degrees clockwise from the x-axis to the first side of the pie shape. sweep_angle Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Remarks
This method draws a pie shape defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie shape consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ draw_pie() [3/4]

 void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle )

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

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the pie shape. x The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes. y The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes. width Width of the bounding rectangle that defines the ellipse from which the pie shape comes. heught Height of the bounding rectangle that defines the ellipse from which the pie shape comes. start_angle Angle measured in degrees clockwise from the x-axis to the first side of the pie shape. sweep_angle Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Remarks
This method draws a pie shape defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle described by the x, y, width, and height parameters. The pie shape consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ draw_pie() [4/4]

 void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & 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.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the pie shape. x The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes. y The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes. width Width of the bounding rectangle that defines the ellipse from which the pie shape comes. heught Height of the bounding rectangle that defines the ellipse from which the pie shape comes. start_angle Angle measured in degrees clockwise from the x-axis to the first side of the pie shape. sweep_angle Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Remarks
This method draws a pie shape defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle described by the x, y, width, and height parameters. The pie shape consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ draw_point() [1/4]

 void xtd::drawing::graphics::draw_point ( const xtd::drawing::pen & pen, const xtd::drawing::point & point )

Draws a point specified by the coordinate pairs.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the point. point xtd::drawing::point structure that represents the point.

## ◆ draw_point() [2/4]

 void xtd::drawing::graphics::draw_point ( const xtd::drawing::pen & pen, const xtd::drawing::point_f & point )

Draws a point specified by the coordinate pairs.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the point. point xtd::drawing::point_f structure that represents the point.

## ◆ draw_point() [3/4]

 void xtd::drawing::graphics::draw_point ( const xtd::drawing::pen & pen, int32_t x, int32_t y )

Draws a point specified by the coordinate pairs.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the point. x1 The x-coordinate of the point. y1 The y-coordinate of the point.

## ◆ draw_point() [4/4]

 void xtd::drawing::graphics::draw_point ( const xtd::drawing::pen & pen, float x, float y )

Draws a point specified by the coordinate pairs.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the point. x1 The x-coordinate of the point. y1 The y-coordinate of the point.

## ◆ draw_polygon() [1/2]

 void xtd::drawing::graphics::draw_polygon ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::point > & points )

Draws a polygon defined by an array of xtd::drawing::point structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the polygon. points Array of xtd::drawing::point structures that represent the vertices of the polygon.
Remarks
Every pair of two consecutive points in the array specifies a side of the polygon. In addition, if the last point and the first of the array point do not coincide, they specify the last side of the polygon.

## ◆ draw_polygon() [2/2]

 void xtd::drawing::graphics::draw_polygon ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::point_f > & points )

Draws a polygon defined by an array of xtd::drawing::point_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the polygon. points Array of xtd::drawing::point_f structures that represent the vertices of the polygon.
Remarks
Every pair of two consecutive points in the array specifies a side of the polygon. In addition, if the last point and the first of the array point do not coincide, they specify the last side of the polygon.

## ◆ draw_rectangle() [1/4]

 void xtd::drawing::graphics::draw_rectangle ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle & rect )

Draws a rectangle specified by a xtd::drawing::rectangle structure.

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rectangle. rect A xtd::drawing::rectangle structure that represents the rectangle to draw.
Examples:
fill_rectangle.cpp.

## ◆ draw_rectangle() [2/4]

 void xtd::drawing::graphics::draw_rectangle ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle_f & rect )

Draws a rectangle specified by a xtd::drawing::rectangle_f structure.

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rectangle. rect A xtd::drawing::rectangle_f structure that represents the rectangle to draw.

## ◆ draw_rectangle() [3/4]

 void xtd::drawing::graphics::draw_rectangle ( const xtd::drawing::pen & pen, int32_t x, int32_t y, int32_t width, int32_t height )

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

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rectangle. x The x-coordinate of the upper-left corner of the rectangle to draw. y The y-coordinate of the upper-left corner of the rectangle to draw. width The width of the rectangle to draw. height The height of the rectangle to draw.

## ◆ draw_rectangle() [4/4]

 void xtd::drawing::graphics::draw_rectangle ( const xtd::drawing::pen & pen, float x, float y, float width, float height )

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

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rectangle. x The x-coordinate of the upper-left corner of the rectangle to draw. y The y-coordinate of the upper-left corner of the rectangle to draw. width The width of the rectangle to draw. height The height of the rectangle to draw.

## ◆ draw_rectangles() [1/2]

 void xtd::drawing::graphics::draw_rectangles ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::rectangle > & rects )

Draws a series of rectangles specified by xtd::drawing::rectangle structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the outlines of the rectangles. rects Array of xtd::drawing::rectangle structures that represent the rectangles to draw.

## ◆ draw_rectangles() [2/2]

 void xtd::drawing::graphics::draw_rectangles ( const xtd::drawing::pen & pen, const std::vector< xtd::drawing::rectangle_f > & rects )

Draws a series of rectangles specified by xtd::drawing::rectangle_f structures.

Parameters
 pen xtd::drawing::pen that determines the color, width, and style of the outlines of the rectangles. rects Array of xtd::drawing::rectangle_f structures that represent the rectangles to draw.

## ◆ draw_rotated_string() [1/2]

 void xtd::drawing::graphics::draw_rotated_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, const xtd::drawing::point_f & point, float angle )

Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. point xtd::drawing::point_f structure that specifies the upper-left corner of the drawn text. angle The angle, measured in degrees clockwise from the x-axis, of the text's orientation line.

## ◆ draw_rotated_string() [2/2]

 void xtd::drawing::graphics::draw_rotated_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, float x, float y, float angle )

Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. x The x-coordinate of the upper-left corner of the drawn text. y The y-coordinate of the upper-left corner of the drawn text. angle The angle, measured in degrees clockwise from the x-axis, of the text's orientation line.

## ◆ draw_rounded_rectangle() [1/4]

 void xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle & rect, int32_t radius )

Draws a rounded rectangle specified by a xtd::drawing::rectangle structure, and radius.

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rounded rectangle. rect A xtd::drawing::rectangle structure that represents the rounded rectangle to draw. radius The radius of the rounded rectange angles.

## ◆ draw_rounded_rectangle() [2/4]

 void xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & pen, const xtd::drawing::rectangle_f & rect, float radius )

Draws a rounded rectangle specified by a xtd::drawing::rectangle_f structure, and radius.

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rounded rectangle. rect A xtd::drawing::rectangle_f structure that represents the rounded rectangle to draw. radius The radius of the rounded rectange angles.

## ◆ draw_rounded_rectangle() [3/4]

 void xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius )

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

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rounded rectangle. x The x-coordinate of the upper-left corner of the rounded rectangle to draw. y The y-coordinate of the upper-left corner of the rounded rectangle to draw. width The width of the rounded rectangle to draw. height The height of the rounded rectangle to draw. radius The radius of the rounded rectange angles.

## ◆ draw_rounded_rectangle() [4/4]

 void xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & 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.

Parameters
 pen A xtd::drawing::pen that determines the color, width, and style of the rounded rectangle. x The x-coordinate of the upper-left corner of the rounded rectangle to draw. y The y-coordinate of the upper-left corner of the rounded rectangle to draw. width The width of the rounded rectangle to draw. height The height of the rounded rectangle to draw. radius The radius of the rounded rectange angles.

## ◆ draw_string() [1/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & layout_rectangle )

Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. layout_rectangle xtd::drawing::rectangle_f structure that specifies the location of the drawn text.
Remarks
The text represented by the s parameter is drawn inside the rectangle represented by the layout_rectangle parameter. If the text does not fit inside the rectangle, it is truncated at the nearest word. To further manipulate how the string is drawn inside the rectangle use the xtd::drawing::graphics::draw_string overload that takes a xtd::drawing::string_format.
Examples:
user_control.cpp.

## ◆ draw_string() [2/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & layout_rectangle, const xtd::drawing::string_format & format )

Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. layout_rectangle xtd::drawing::rectangle_f structure that specifies the location of the drawn text. format xtd::drawing::string_format that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Remarks
The text represented by the s parameter is drawn inside the rectangle represented by the layout_rectangle parameter. If the text does not fit inside the rectangle, it is truncated at the nearest word, unless otherwise specified with the format parameter.

## ◆ draw_string() [3/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, const xtd::drawing::point_f & point )

Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. point xtd::drawing::point_f structure that specifies the upper-left corner of the drawn text.

## ◆ draw_string() [4/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, const xtd::drawing::point_f & point, const xtd::drawing::string_format & format )

Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. point xtd::drawing::point_f structure that specifies the upper-left corner of the drawn text. format xtd::drawing::string_format that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

## ◆ draw_string() [5/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, float x, float y )

Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. x The x-coordinate of the upper-left corner of the drawn text. y The y-coordinate of the upper-left corner of the drawn text.

## ◆ draw_string() [6/6]

 void xtd::drawing::graphics::draw_string ( const xtd::ustring & s, const xtd::drawing::font & font, const xtd::drawing::brush & brush, float x, float y, const xtd::drawing::string_format & format )

Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format.

Parameters
 s String to draw. font xtd::drawing::font that defines the text format of the string. brush xtd::drawing::brush that determines the color and texture of the drawn text. x The x-coordinate of the upper-left corner of the drawn text. y The y-coordinate of the upper-left corner of the drawn text. format xtd::drawing::string_format that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

## ◆ exclude_clip() [1/3]

 void xtd::drawing::graphics::exclude_clip ( const xtd::drawing::region & region )

Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::region.

Parameters
 region xtd::drawing::region that specifies the region to exclude from the clip region.
Remarks
This method excludes the area specified by the region parameter from the current clip region and assigns the resulting area to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics.

## ◆ exclude_clip() [2/3]

 void xtd::drawing::graphics::exclude_clip ( const xtd::drawing::rectangle & rect )

Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle.

Parameters
 rect xtd::drawing::rectangle that specifies the rectangle to exclude from the clip region.
Remarks
This method excludes the area specified by the rect parameter from the current clip region and assigns the resulting area to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics.

## ◆ exclude_clip() [3/3]

 void xtd::drawing::graphics::exclude_clip ( const xtd::drawing::rectangle_f & rect )

Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle_f.

Parameters
 rect xtd::drawing::rectangle_f that specifies the rectangle to exclude from the clip region.
Remarks
This method excludes the area specified by the rect parameter from the current clip region and assigns the resulting area to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics.

## ◆ fill_closed_curve() [1/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point > & points )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point structures that define the spline.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point structures.
This method uses a default tension of 0.0.

## ◆ fill_closed_curve() [2/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point_f > & points )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point_f structures that define the spline.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point_f structures.
This method uses a default tension of 0.0.

## ◆ fill_closed_curve() [3/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point > & points, xtd::drawing::drawing2d::fill_mode fill_mode )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures using the specified fill mode.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point structures that define the spline. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines how the curve is filled.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point structures.
This method uses a default tension of 0.0.

## ◆ fill_closed_curve() [4/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point_f > & points, xtd::drawing::drawing2d::fill_mode fill_mode )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures using the specified fill mode.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point_f structures that define the spline. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines how the curve is filled.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point_f structures.
This method uses a default tension of 0.0.

## ◆ fill_closed_curve() [5/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point > & points, xtd::drawing::drawing2d::fill_mode fill_mode, float tension )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures using the specified fill mode and tension.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point structures that define the spline. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines how the curve is filled. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point structures.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ fill_closed_curve() [6/6]

 void xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point_f > & points, xtd::drawing::drawing2d::fill_mode fill_mode, float tension )

Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures using the specified fill mode and tension.

Parameters
 brush A xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point_f structures that define the spline. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines how the curve is filled. tension Value greater than or equal to 0.0F that specifies the tension of the curve.
Remarks
This method fills the interior of a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four xtd::drawing::point_f structures.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.

## ◆ fill_ellipse() [1/4]

 void xtd::drawing::graphics::fill_ellipse ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle & rect )

Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle structure that represents the bounding rectangle that defines the ellipse.
Remarks
This method fills the interior of an ellipse with a xtd::drawing::brush. The ellipse is defined by the bounding rectangle represented by the rect parameter.
Examples:
fill_rectangle.cpp.

## ◆ fill_ellipse() [2/4]

 void xtd::drawing::graphics::fill_ellipse ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & rect )

Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle_f structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle_f structure that represents the bounding rectangle that defines the ellipse.
Remarks
This method fills the interior of an ellipse with a xtd::drawing::brush. The ellipse is defined by the bounding rectangle represented by the rect parameter.

## ◆ fill_ellipse() [3/4]

 void xtd::drawing::graphics::fill_ellipse ( const xtd::drawing::brush & brush, int32_t x, int32_t y, int32_t width, int32_t height )

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

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. 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 Width of the bounding rectangle that defines the ellipse. height Height of the bounding rectangle that defines the ellipse.
Remarks
This method fills the interior of an ellipse with a xtd::drawing::brush. The ellipse is defined by the bounding rectangle represented by the x, y, width, and height parameters.

## ◆ fill_ellipse() [4/4]

 void xtd::drawing::graphics::fill_ellipse ( const xtd::drawing::brush & brush, float x, float y, float width, float height )

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

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. 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 Width of the bounding rectangle that defines the ellipse. height Height of the bounding rectangle that defines the ellipse.
Remarks
This method fills the interior of an ellipse with a xtd::drawing::brush. The ellipse is defined by the bounding rectangle represented by the x, y, width, and height parameters.

## ◆ fill_path()

 void xtd::drawing::graphics::fill_path ( const xtd::drawing::brush & brush, const xtd::drawing::drawing2d::graphics_path & path )

Fills the interior of a xtd::drawing::drawing2d::graphics_path.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. path xtd::drawing::drawing2d::graphics_path that represents the path to fill.
Remarks
A xtd::drawing::drawing2d::graphics_path consists of a series of line and curve segments. If the path represented by the path parameter is not closed, an additional segment is added from the last point to the first point to close the path.

## ◆ fill_pie() [1/4]

 void xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle & rect, float start_angle, float sweep_angle )

Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes. start_angle Angle in degrees measured clockwise from the x-axis to the first side of the pie section. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
Remarks
This method fills the interior of a pie section defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie section consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ fill_pie() [2/4]

 void xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & rect, float start_angle, float sweep_angle )

Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle_f structure that represents the bounding rectangle that defines the ellipse from which the pie section comes. start_angle Angle in degrees measured clockwise from the x-axis to the first side of the pie section. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
Remarks
This method fills the interior of a pie section defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie section consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ fill_pie() [3/4]

 void xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t 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.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes. y The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes. width Width of the bounding rectangle that defines the ellipse from which the pie section comes. height Height of the bounding rectangle that defines the ellipse from which the pie section comes. start_angle Angle in degrees measured clockwise from the x-axis to the first side of the pie section. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
Remarks
This method fills the interior of a pie section defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie section consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ fill_pie() [4/4]

 void xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & 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.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes. y The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes. width Width of the bounding rectangle that defines the ellipse from which the pie section comes. height Height of the bounding rectangle that defines the ellipse from which the pie section comes. start_angle Angle in degrees measured clockwise from the x-axis to the first side of the pie section. sweep_angle Angle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
Remarks
This method fills the interior of a pie section defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle. The pie section consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.

## ◆ fill_polygon() [1/4]

 void xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point > & points )

Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point structures that represent the vertices of the polygon to fill.
Remarks
Every two consecutive points in the array specify a side of the polygon. In addition, if the last point and the first point do not coincide, they specify the closing side of the polygon.

## ◆ fill_polygon() [2/4]

 void xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point_f > & points )

Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point_f structures that represent the vertices of the polygon to fill.
Remarks
Every two consecutive points in the array specify a side of the polygon. In addition, if the last point and the first point do not coincide, they specify the closing side of the polygon.

## ◆ fill_polygon() [3/4]

 void xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point > & points, xtd::drawing::drawing2d::fill_mode fill_mode )

Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures using the specified fill mode.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point structures that represent the vertices of the polygon to fill. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines the style of the fill.
Remarks
Every two consecutive points in the array specify a side of the polygon. In addition, if the last point and the first point do not coincide, they specify the closing side of the polygon.

## ◆ fill_polygon() [4/4]

 void xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::point_f > & points, xtd::drawing::drawing2d::fill_mode fill_mode )

Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures using the specified fill mode.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. points Array of xtd::drawing::point_f structures that represent the vertices of the polygon to fill. fill_mode Member of the xtd::drawing::drawing2d::fill_mode enumeration that determines the style of the fill.
Remarks
Every two consecutive points in the array specify a side of the polygon. In addition, if the last point and the first point do not coincide, they specify the closing side of the polygon.

## ◆ fill_rectangle() [1/4]

 void xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle & rect )

Fills the interior of a rectangle specified by a xtd::drawing::rectangle structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle structure that represents the rectangle to fill.
Remarks
This method fills the interior of the rectangle defined by the rect parameter, including the specified upper-left corner and up to the calculated lower and bottom edges.
Examples:
fill_rectangle.cpp, and user_control.cpp.

## ◆ fill_rectangle() [2/4]

 void xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & rect )

Fills the interior of a rectangle specified by a xtd::drawing::rectangle_f structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle_f structure that represents the rectangle to fill.
Remarks
This method fills the interior of the rectangle defined by the rect parameter, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rectangle() [3/4]

 void xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & brush, int32_t x, int32_t y, int32_t width, int32_t height )

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

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the rectangle to fill. y The y-coordinate of the upper-left corner of the rectangle to fill. width Width of the rectangle to fill. height Height of the rectangle to fill.
Remarks
This method fills the interior of the rectangle defined by the x, y, width, and height parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rectangle() [4/4]

 void xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & 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.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the rectangle to fill. y The y-coordinate of the upper-left corner of the rectangle to fill. width Width of the rectangle to fill. height Height of the rectangle to fill.
Remarks
This method fills the interior of the rectangle defined by the x, y, width, and height parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rectangles() [1/2]

 void xtd::drawing::graphics::fill_rectangles ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::rectangle > & rects )

Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle structures.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rects Array of xtd::drawing::rectangle structures that represent the rectangles to fill.

## ◆ fill_rectangles() [2/2]

 void xtd::drawing::graphics::fill_rectangles ( const xtd::drawing::brush & brush, const std::vector< xtd::drawing::rectangle_f > & rects )

Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle_f structures.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rects Array of xtd::drawing::rectangle_f structures that represent the rectangles to fill.

## ◆ fill_region()

 void xtd::drawing::graphics::fill_region ( const xtd::drawing::brush & brush, const xtd::drawing::region & region )

Fills the interior of a xtd::drawing::region.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. region xtd::drawing::region that represents the area to fill.
Remarks
A xtd::drawing::region is composed of rectangles and paths. If the region is not closed, an additional segment is added from the last point to the first point to close it.

## ◆ fill_rounded_rectangle() [1/4]

 void xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle & rect, int32_t radius )

Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle structure that represents the rounded rectangle to fill. radius The radius of the rounded rectange angles.
Remarks
This method fills the interior of the rounded rectangle defined by the rect, and radius parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rounded_rectangle() [2/4]

 void xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush, const xtd::drawing::rectangle_f & rect, float radius )

Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle_f structure.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. rect xtd::drawing::rectangle_f structure that represents the rounded rectangle to fill. radius The radius of the rounded rectange angles.
Remarks
This method fills the interior of the rounded rectangle defined by the rect, and radius parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rounded_rectangle() [3/4]

 void xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius )

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

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the rounded rectangle to fill. y The y-coordinate of the upper-left corner of the rounded rectangle to fill. width Width of the rounded rectangle to fill. height Height of the rounded rectangle to fill. radius The radius of the rounded rectange angles.
Remarks
This method fills the interior of the rounded rectangle defined by the x, y, width, height, and radius parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ fill_rounded_rectangle() [4/4]

 void xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & 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.

Parameters
 brush xtd::drawing::brush that determines the characteristics of the fill. x The x-coordinate of the upper-left corner of the rounded rectangle to fill. y The y-coordinate of the upper-left corner of the rounded rectangle to fill. width Width of the rounded rectangle to fill. height Height of the rounded rectangle to fill. radius The radius of the rounded rectange angles.
Remarks
This method fills the interior of the rounded rectangle defined by the x, y, width, height, and radius parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

## ◆ flush() [1/2]

 void xtd::drawing::graphics::flush ( )

Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.

Remarks
This method starts a flush and returns immediately without waiting for any currently executing graphics operation to finish.

## ◆ flush() [2/2]

 void xtd::drawing::graphics::flush ( xtd::drawing::drawing2d::flush_intention intention )

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

Parameters
 intention Member of the xtd::drawing::drawing2d::flush_intention enumeration that specifies whether the method returns immediately or waits for any existing operations to finish.
Remarks
A value of xtd::drawing::graphics::flush for the intention parameter specifies that the method return immediately after beginning the flush, while a value of xtd::drawing::drawing2d::flush_intention::sync specifies that the method wait before returning until any existing operations finish.

## ◆ from_hdc() [1/2]

 static graphics xtd::drawing::graphics::from_hdc ( intptr_t hdc )
static

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

Parameters
 hdc Handle to a device context.
Returns
This method returns a new xtd::drawing::graphics for the specified device context.
Remarks
Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a xtd::drawing::graphics, construct the xtd::drawing::graphics from an HDC after you pass the HDC (and ICM_ON) to the SetICMMode function. Then any drawing done by the xtd::drawing::graphics will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
The state of the device context (mapping mode, logical unit, and the like) at the time you call xtd::drawing::graphics::from_hdc can affect rendering done by the xtd::drawing::graphics.

## ◆ from_hdc() [2/2]

 static graphics xtd::drawing::graphics::from_hdc ( intptr_t hdc, intptr_t hdevice )
static

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

Parameters
 hdc Handle to a device context. hdevice Handle to a device.
Returns
This method returns a new xtd::drawing::graphics for the specified device context and device.
Remarks
Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a xtd::drawing::graphics, construct the xtd::drawing::graphics from an HDC after you pass the HDC (and ICM_ON) to the SetICMMode function. Then any drawing done by the xtd::drawing::graphics will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
The state of the device context (mapping mode, logical unit, and the like) at the time you call xtd::drawing::graphics::from_hdc can affect rendering done by the xtd::drawing::graphics.

## ◆ from_hwnd()

 static graphics xtd::drawing::graphics::from_hwnd ( intptr_t hwnd )
static

Creates a new xtd::drawing::graphics from the specified handle to a window.

Parameters
 hwnd Handle to a window.
Returns
This method returns a new xtd::drawing::graphics for the specified window handle.

## ◆ from_image()

 static graphics xtd::drawing::graphics::from_image ( const xtd::drawing::image & image )
static

Creates a new xtd::drawing::graphics from the specified xtd::drawing::image.

Parameters
 image xtd::drawing::image from which to create the new xtd::drawing::graphics.
Returns
This method returns a new xtd::drawing::graphics for the specified Image.
Remarks
If the image has an indexed pixel format, this method throws an exception with the message, "A xtd::drawing::graphics object cannot be created from an image that has an indexed pixel format." The indexed pixel formats are shown in the following list.
You can save the indexed image as another format by using the xtd::drawing:image::save(xtd::ustring, xtd::drawing::imaging::image_format) method and then retrieve a xtd::drawing::graphics object for the new image.
This method also throws an exception if the image has any of the following pixel formats.

## ◆ get_hdc()

 intptr_t xtd::drawing::graphics::get_hdc ( ) const

Gets the handle to the device context associated with this xtd::drawing::graphics.

Returns
Handle to the device context associated with this xtd::drawing::graphics.
Remarks
The device context is a Windows structure based on GDI that defines a set of graphical objects and their associated attributes, as well as the graphical modes that affect output. This method returns that device context with the exception of a font. Because a font is not selected, calls to the xtd::drawing::graphics::from_hdc method using a handle returned from the xtd::drawing::graphics::get_hdc method will fail.
Calls to the xtd::drawing::graphics::get_hdc and xtd::drawing::graphics::release_hdc methods must appear in pairs. During the scope of a xtd::drawing::graphics::get_hdc and xtd::drawing::graphics::release_hdc method pair, you usually make only calls to GDI functions. Calls in that scope made to GDI+ methods of the xtd::drawing::graphics that produced the hdc parameter fail with an ObjectBusy error. Also, GDI+ ignores any state changes made to the xtd::drawing::graphics of the hdc parameter in subsequent operations.

## ◆ get_nearest_color()

 xtd::drawing::color xtd::drawing::graphics::get_nearest_color ( const xtd::drawing::color & color ) const

Gets the nearest color to the specified xtd::drawing::color structure.

Parameters
 color xtd::drawing::color structure for which to find a match.
Returns
A xtd::drawing::color structure that represents the nearest color to the one specified with the color parameter.

## ◆ handle()

 intptr_t xtd::drawing::graphics::handle ( ) const

Gets the handle device context that the graphics is bound to.

Returns
An intptr_t that contains the handle device context of the graphics.

## ◆ interpolation_mode() [1/2]

 xtd::drawing::drawing2d::interpolation_mode xtd::drawing::graphics::interpolation_mode ( ) const

Gets the interpolation mode associated with this xtd::drawing::graphics.

Returns
One of the xtd::drawing::drawing2d::interpolation_mode values.
Remarks
The interpolation mode determines how intermediate values between two endpoints are calculated.

## ◆ interpolation_mode() [2/2]

 graphics& xtd::drawing::graphics::interpolation_mode ( xtd::drawing::drawing2d::interpolation_mode value )

Sets the interpolation mode associated with this xtd::drawing::graphics.

Parameters
 value One of the xtd::drawing::drawing2d::interpolation_mode values.
Returns
This current instance.
Remarks
The interpolation mode determines how intermediate values between two endpoints are calculated.

## ◆ intersect_clip() [1/3]

 void xtd::drawing::graphics::intersect_clip ( const xtd::drawing::region & region )

Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::region.

Parameters
 region xtd::drawing::region to intersect with the current region.
Remarks
This method assigns to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics the area represented by the intersection of the current clip region and the region specified by the region parameter.

## ◆ intersect_clip() [2/3]

 void xtd::drawing::graphics::intersect_clip ( const xtd::drawing::rectangle & rect )

Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::rectangle structure.

Parameters
 rect xtd::drawing::rectangle structure to intersect with the current clip region.
Remarks
This method assigns to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics the area represented by the intersection of the current clip region and the rectangle specified by the rect parameter.

## ◆ intersect_clip() [3/3]

 void xtd::drawing::graphics::intersect_clip ( const xtd::drawing::rectangle_f & rect )

Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::rectangle_f structure.

Parameters
 rect xtd::drawing::rectangle_f structure to intersect with the current clip region.
Remarks
This method assigns to the xtd::drawing::graphics::clip property of this xtd::drawing::graphics the area represented by the intersection of the current clip region and the rectangle specified by the rect parameter.

## ◆ is_visible() [1/8]

 bool xtd::drawing::graphics::is_visible ( const xtd::drawing::rectangle & rect )

Indicates whether the rectangle specified by a xtd::drawing::rectangle structure is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 rect xtd::drawing::rectangle structure to test for visibility.
Returns
true if the rectangle specified by the rect parameter is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [2/8]

 bool xtd::drawing::graphics::is_visible ( const xtd::drawing::rectangle_f & rect )

Indicates whether the rectangle specified by a xtd::drawing::rectangle_f structure is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 rect xtd::drawing::rectangle_f structure to test for visibility.
Returns
true if the rectangle specified by the rect parameter is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [3/8]

 bool xtd::drawing::graphics::is_visible ( int32_t x, int32_t y, int32_t width, int32_t height )

Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 x The x-coordinate of the upper-left corner of the rectangle to test for visibility. y The y-coordinate of the upper-left corner of the rectangle to test for visibility. width Width of the rectangle to test for visibility. height Height of the rectangle to test for visibility.
Returns
true if the rectangle defined by the x, y, width, and height parameters is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [4/8]

 bool xtd::drawing::graphics::is_visible ( float x, float y, float width, float height )

Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 x The x-coordinate of the upper-left corner of the rectangle to test for visibility. y The y-coordinate of the upper-left corner of the rectangle to test for visibility. width Width of the rectangle to test for visibility. height Height of the rectangle to test for visibility.
Returns
true if the rectangle defined by the x, y, width, and height parameters is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [5/8]

 bool xtd::drawing::graphics::is_visible ( const xtd::drawing::point & point )

ndicates whether the specified xtd::drawing::point structure is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 point xtd::drawing::point structure to test for visibility.
Returns
true if the point specified by the point parameter is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [6/8]

 bool xtd::drawing::graphics::is_visible ( const xtd::drawing::point_f & point )

ndicates whether the specified xtd::drawing::point_f structure is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 point xtd::drawing::point_f structure to test for visibility.
Returns
true if the point specified by the point parameter is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [7/8]

 bool xtd::drawing::graphics::is_visible ( int32_t x, int32_t y )

Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 x The x-coordinate of the point to test for visibility. y The y-coordinate of the point to test for visibility.
Returns
true if the point defined by the x and y parameters is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ is_visible() [8/8]

 bool xtd::drawing::graphics::is_visible ( float x, float y )

Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics.

Parameters
 x The x-coordinate of the point to test for visibility. y The y-coordinate of the point to test for visibility.
Returns
true if the point defined by the x and y parameters is contained within the visible clip region of this xtd::drawing::graphics; otherwise, false.

## ◆ measure_string() [1/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font )

Measures the specified string when drawn with the specified xtd::drawing::font.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.
Examples:
user_control.cpp.

## ◆ measure_string() [2/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, const xtd::drawing::size_f & layout_area )

Measures the specified string when drawn with the specified xtd::drawing::font within the specified layout area.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. layout_area xtd::drawing::size_f structure that specifies the maximum layout area for the text.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ measure_string() [3/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, int32_t width )

Measures the specified string when drawn with the specified xtd::drawing::font.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. width Maximum width of the string in pixels.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ measure_string() [4/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, const xtd::drawing::point_f & origin, const xtd::drawing::string_format & format )

Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. origin xtd::drawing::point_f structure that represents the upper-left corner of the string. format xtd::drawing::string_format that represents formatting information, such as line spacing, for the string.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ measure_string() [5/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, const xtd::drawing::size_f & layout_area, const xtd::drawing::string_format & format )

Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. layout_area xtd::drawing::size_f structure that specifies the maximum layout area for the text. format xtd::drawing::string_format that represents formatting information, such as line spacing, for the string.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ measure_string() [6/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, int32_t width, const xtd::drawing::string_format & format )

Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. width Maximum width of the string in pixels. format xtd::drawing::string_format that represents formatting information, such as line spacing, for the string.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ measure_string() [7/7]

 size_f xtd::drawing::graphics::measure_string ( const xtd::ustring & text, const xtd::drawing::font & font, const xtd::drawing::size_f & layout_area, const xtd::drawing::string_format & format, size_t characters_fitted, size_t lines_filled )

Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. layout_area xtd::drawing::size_f structure that specifies the maximum layout area for the text. format xtd::drawing::string_format that represents formatting information, such as line spacing, for the string. characters_fitted Number of characters in the string. lines_filled Number of text lines in the string.
Remarks
The xtd::drawing::graphics::measure_string method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the xtd::drawing::graphics::draw_string method adjusts glyph points to optimize display quality and might display a string narrower than reported byxtd::drawing::graphics::measure_string. To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the xtd::drawing::graphics::measure_character_ranges method or one of the xtd::drawing::graphics::measure_string methods that takes a xtd::drawing::string_format, and pass xtd::drawing::string_format::generic_typographic. Also, ensure the xtd::drawing::text::text_rendering_hint for the xtd::drawing::graphics is xtd::drawing::text::text_rendering_hint::anti_alias.

## ◆ multiply_transform() [1/2]

 void xtd::drawing::graphics::multiply_transform ( const xtd::drawing::drawing2d::matrix & matrix )

Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing2d::matrix.

Parameters
 matrix 4x4 xtd::drawing::drawing2d::matrix that multiplies the world transformation.
Remarks
This method prepends the matrix specified by the matrix parameter, so that the result is matrix x world transformation.

## ◆ multiply_transform() [2/2]

 void xtd::drawing::graphics::multiply_transform ( const xtd::drawing::drawing2d::matrix & matrix, xtd::drawing::drawing2d::matrix_order order )

Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing2d::matrix with specified order.

Parameters
 matrix 4x4 xtd::drawing::drawing2d::matrix that multiplies the world transformation. order Member of the xtd::drawing::drawing2d::matrix_order enumeration that determines the order of the multiplication.
Remarks
This method prepends the matrix specified by the matrix parameter, so that the result is matrix x world transformation.

## ◆ page_scale() [1/2]

 float xtd::drawing::graphics::page_scale ( ) const

Gets the scaling between world units and page units for this xtd::drawing::graphics.

Returns
This property specifies a value for the scaling between world units and page units for this xtd::drawing::graphics.

## ◆ page_scale() [2/2]

 graphics& xtd::drawing::graphics::page_scale ( float value )

Sets the scaling between world units and page units for this xtd::drawing::graphics.

Parameters
 value This property specifies a value for the scaling between world units and page units for this xtd::drawing::graphics.
Returns
This current instance.

## ◆ page_unit() [1/2]

 xtd::drawing::graphics_unit xtd::drawing::graphics::page_unit ( ) const

Gets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics.

Returns
One of the xtd::drawing::graphics_unit values other than xtd::drawing::graphics_unit::world.
Remarks
The graphics unit is the unit of measure used for page coordinates in this xtd::drawing::graphics.

## ◆ page_unit() [2/2]

 graphics& xtd::drawing::graphics::page_unit ( xtd::drawing::graphics_unit value )

Sets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics.

Parameters
 value One of the xtd::drawing::graphics_unit values other than xtd::drawing::graphics_unit::world.
Returns
This current instance.
Exceptions
 xtd::argument_exception xtd::drawing::graphics::page_unit is set to xtd::drawing::graphics_unit::world, which is not a physical unit.
Remarks
The graphics unit is the unit of measure used for page coordinates in this xtd::drawing::graphics.

## ◆ pixel_offset_mode() [1/2]

 xtd::drawing::drawing2d::pixel_offset_mode xtd::drawing::graphics::pixel_offset_mode ( ) const

Gets a value specifying how pixels are offset during rendering of this xtd::drawing::graphics.

Returns
This property specifies a member of the xtd::drawing::drawing2d::pixel_offset_mode enumeration.
Remarks
Use this property to specify either higher quality, slower rendering, or lower quality, faster rendering of the contents of this xtd::drawing::graphics object.

## ◆ pixel_offset_mode() [2/2]

 graphics& xtd::drawing::graphics::pixel_offset_mode ( xtd::drawing::drawing2d::pixel_offset_mode value )

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

Parameters
 value This property specifies a member of the xtd::drawing::drawing2d::pixel_offset_mode enumeration.
Returns
This current instance.
Remarks
Use this property to specify either higher quality, slower rendering, or lower quality, faster rendering of the contents of this xtd::drawing::graphics object.

## ◆ release_hdc()

 void xtd::drawing::graphics::release_hdc ( intptr_t hdc )

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

Parameters
 hdc Handle to a device context obtained by a previous call to the xtd::drawing::graphics::get_hdc() method of this xtd::drawing::graphics.
Remarks
The device context is a Windows structure based on GDI that defines a set of graphical objects and their associated attributes, as well as the graphical modes that affect output. This method returns that device context with the exception of a font. Because a font is not selected, calls to the xtd::drawing::graphics::from_hdc method using a handle returned from the xtd::drawing::graphics::get_hdc method will fail.
Calls to the xtd::drawing::graphics::get_hdc and xtd::drawing::graphics::release_hdc methods must appear in pairs. During the scope of a xtd::drawing::graphics::get_hdc and xtd::drawing::graphics::release_hdc method pair, you usually make only calls to GDI functions. Calls in that scope made to GDI+ methods of the xtd::drawing::graphics that produced the hdc parameter fail with an ObjectBusy error. Also, GDI+ ignores any state changes made to the xtd::drawing::graphics of the hdc parameter in subsequent operations.

## ◆ reset_clip()

 void xtd::drawing::graphics::reset_clip ( )

Resets the clip region of this xtd::drawing::graphics to an infinite region.

Remarks
When the clipping region of a xtd::drawing::graphics is infinite, items that this xtd::drawing::graphics draws are not clipped.

## ◆ reset_transform()

 void xtd::drawing::graphics::reset_transform ( )

Resets the world transformation matrix of this xtd::drawing::graphics to the identity matrix.

Remarks
The identity matrix represents a transformation with no scaling, rotation, or translation. Resetting the world transformation of this xtd::drawing::graphics to the identity matrix means that its world transformation does not change the geometry of transformed items.

## ◆ restore()

 void xtd::drawing::graphics::restore ( const xtd::drawing::drawing2d::graphics_state & gstate )

Restores the state of this xtd::drawing::graphics to the state represented by a xtd::drawing::drawing2d::graphics_state.

Parameters
 gstate xtd::drawing::drawing2d::graphics_state that represents the state to which to restore this xtd::drawing::graphics.
Remarks
When you call the xtd::drawing::graphics::save method of a xtd::drawing::graphics, an information block that holds the state of the xtd::drawing::graphics is put on a stack. The xtd::drawing::graphics::save method returns a xtd::drawing::drawing2d::graphics_state that identifies that information block. When you pass the identifying xtd::drawing::drawing2d::graphics_state to the xtd::drawing::graphics::restore method, the information block is removed from the stack and is used to restore the xtd::drawing::graphics to the state it was in at the time of the xtd::drawing::graphics::save method call. Note that the xtd::drawing::drawing2d::graphics_state returned by a given call to the Save method can be passed only once to the xtd::drawing::graphics::restore method.
Calls to the xtd::drawing::graphics::save method can be nested; that is, you can call the xtd::drawing::graphics::save method several times before you call the xtd::drawing::graphics::restore method. Each time you call the xtd::drawing::graphics::save method, an information block is put on the stack, and you receive a xtd::drawing::drawing2d::graphics_state for the information block. When you pass one of those objects to the xtd::drawing::graphics::restore method, the xtd::drawing::graphics is returned to the state it was in at the time of the xtd::drawing::graphics::save method call that returned that particular xtd::drawing::drawing2d::graphics_state. The information block placed on the stack by thatxtd::drawing::graphics::sSave method call is removed from the stack, and all information blocks placed on that stack after that xtd::drawing::graphics::save method call are also removed.

## ◆ rotate_transform() [1/2]

 void xtd::drawing::graphics::rotate_transform ( float angle )

Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics.

Parameters
 angle Angle of rotation in degrees.
Remarks
The rotation operation consists of multiplying the transformation matrix by a matrix whose elements are derived from the angle parameter. This method applies the rotation by prepending it to the transformation matrix.

## ◆ rotate_transform() [2/2]

 void xtd::drawing::graphics::rotate_transform ( float angle, xtd::drawing::drawing2d::matrix_order order )

Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics in the specified order.

Parameters
 angle Angle of rotation in degrees. order Member of the xtd::drawing::drawing2d::matrix_order enumeration that specifies whether the rotation is prepended or appended to the transformation matrix.
Remarks
The rotation operation consists of multiplying the transformation matrix by a matrix whose elements are derived from the angle parameter. This method applies the rotation by prepending it to the transformation matrix.

## ◆ save()

 xtd::drawing::drawing2d::graphics_state xtd::drawing::graphics::save ( )

Saves the current state of this xtd::drawing::graphics and identifies the saved state with a xtd::drawing::drawing2d::graphics_state.

Returns
This method returns a xtd::drawing::drawing2d::graphics_state that represents the saved state of this xtd::drawing::graphics.
Remarks
When you call the xtd::drawing::graphics::save method of a xtd::drawing::graphics, an information block that holds the state of the xtd::drawing::graphics is put on a stack. The xtd::drawing::graphics::save method returns a xtd::drawing::drawing2d::graphics_state that identifies that information block. When you pass the identifying xtd::drawing::drawing2d::graphics_state to the xtd::drawing::graphics::restore method, the information block is removed from the stack and is used to restore the xtd::drawing::graphics to the state it was in at the time of the xtd::drawing::graphics::save method call. Note that the xtd::drawing::drawing2d::graphics_state returned by a given call to the Save method can be passed only once to the xtd::drawing::graphics::restore method.
Calls to the xtd::drawing::graphics::save method can be nested; that is, you can call the xtd::drawing::graphics::save method several times before you call the xtd::drawing::graphics::restore method. Each time you call the xtd::drawing::graphics::save method, an information block is put on the stack, and you receive a xtd::drawing::drawing2d::graphics_state for the information block. When you pass one of those objects to the xtd::drawing::graphics::restore method, the xtd::drawing::graphics is returned to the state it was in at the time of the xtd::drawing::graphics::save method call that returned that particular xtd::drawing::drawing2d::graphics_state. The information block placed on the stack by thatxtd::drawing::graphics::sSave method call is removed from the stack, and all information blocks placed on that stack after that xtd::drawing::graphics::save method call are also removed.

## ◆ scale_transform() [1/2]

 void xtd::drawing::graphics::scale_transform ( float sx, float sy )

Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics by prepending it to the object's transformation matrix.

Parameters
 sx Scale factor in the x direction. sy Scale factor in the y direction.
Remarks
The scaling operation consists of multiplying the transformation matrix by a diagonal matrix whose elements are (sx, sy, 1). This method prepends the transformation matrix of the xtd::drawing::graphics by the scaling matrix.

## ◆ scale_transform() [2/2]

 void xtd::drawing::graphics::scale_transform ( float sx, float sy, xtd::drawing::drawing2d::matrix_order order )

Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics in the specified order.

Parameters
 sx Scale factor in the x direction. sy Scale factor in the y direction. order Member of the xtd::drawing::drawing2d::matrix_order enumeration that specifies whether the scaling operation is prepended or appended to the transformation matrix.
Remarks
The scaling operation consists of multiplying the transformation matrix by a diagonal matrix whose elements are (sx, sy, 1). This method prepends the transformation matrix of the xtd::drawing::graphics by the scaling matrix.

## ◆ smoothing_mode() [1/2]

 xtd::drawing::drawing2d::smoothing_mode xtd::drawing::graphics::smoothing_mode ( ) const

Gets the rendering quality for this xtd::drawing::graphics.

Returns
One of the xtd::drawing::drawing2d::smoothing_mode values.
Remarks
The smoothing mode specifies whether lines, curves, and the edges of filled areas use smoothing (also called antialiasing). One exception is that path gradient brushes do not obey the smoothing mode. Areas filled using a xtd::drawing::drawing2d::path_gradient_brush are rendered the same way (aliased) regardless of the xtd::drawing::graphics::smoothing_mode property.

## ◆ smoothing_mode() [2/2]

 graphics& xtd::drawing::graphics::smoothing_mode ( xtd::drawing::drawing2d::smoothing_mode value )

Sets the rendering quality for this xtd::drawing::graphics.

Parameters
 value One of the xtd::drawing::drawing2d::smoothing_mode values.
Returns
This current instance.
Remarks
The smoothing mode specifies whether lines, curves, and the edges of filled areas use smoothing (also called antialiasing). One exception is that path gradient brushes do not obey the smoothing mode. Areas filled using a xtd::drawing::drawing2d::path_gradient_brush are rendered the same way (aliased) regardless of the xtd::drawing::graphics::smoothing_mode property.

## ◆ text_contrast() [1/2]

 int xtd::drawing::graphics::text_contrast ( ) const

Gets the gamma correction value for rendering text.

Returns
The 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.

## ◆ text_contrast() [2/2]

 graphics& xtd::drawing::graphics::text_contrast ( int value )

Sets the gamma correction value for rendering text.

Parameters
 value The gamma correction value used for rendering antialiased and ClearType text.
Returns
This current instance.
Remarks
The gamma correction value must be between 0 and 12. The default value is 4.

## ◆ text_rendering_hint() [1/2]

 xtd::drawing::text::text_rendering_hint xtd::drawing::graphics::text_rendering_hint ( ) const

Gets the rendering mode for text associated with this xtd::drawing::graphics.

Returns
One of the xtd::drawing::graphics::text_rendering_hint values.
Remarks
The text rendering hint specifies whether text renders with antialiasing.
Note
You should not use a xtd::drawing::graphics::compositing_mode property value of xtd::drawing::graphics::source_copy when the xtd::drawing::graphics::text_rendering_hint property is set to xtd::drawing::graphics::text_rendering_hint::clear_type_grid_fit. An exception could occur or the image may not render correctly.

## ◆ text_rendering_hint() [2/2]

 graphics& xtd::drawing::graphics::text_rendering_hint ( xtd::drawing::text::text_rendering_hint value )

Sets the rendering mode for text associated with this xtd::drawing::graphics.

Parameters
 value One of the xtd::drawing::graphics::text_rendering_hint values.
Returns
This current instance.
Remarks
The text rendering hint specifies whether text renders with antialiasing.
Note
You should not use a xtd::drawing::graphics::compositing_mode property value of xtd::drawing::graphics::source_copy when the xtd::drawing::graphics::text_rendering_hint property is set to xtd::drawing::graphics::text_rendering_hint::clear_type_grid_fit. An exception could occur or the image may not render correctly.

## ◆ to_string()

 xtd::ustring xtd::drawing::graphics::to_string ( ) const
inlineoverridevirtualnoexcept

Returns a sxd::ustring that represents the current object.

Returns
A string that represents the current object.
Examples
The following code example demonstrates what to_string returns.

Reimplemented from xtd::object.

## ◆ transform() [1/2]

 xtd::drawing::drawing2d::matrix xtd::drawing::graphics::transform ( ) const

Gets a copy of the geometric world transformation for this xtd::drawing::graphics.

Returns
A copy of the xtd::drawing::drawing2d::matrix that represents the geometric world transformation for this xtd::drawing::graphics.
Remarks
GDI+ uses three coordinate spaces: world, page, and device. World coordinates are the coordinates used to model a particular graphic world and are the coordinates you pass to methods in the .NET Framework. Page coordinates refer to the coordinate system used by a drawing surface, such as a form or a control. Device coordinates are the coordinates used by the physical device being drawn on, such as a screen or a printer. The xtd::drawing::graphics::transform property represents the world transformation, which maps world coordinates to page coordinates.
Because the matrix returned and by the xtd::drawing::graphics::transform property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.

## ◆ transform() [2/2]

 graphics& xtd::drawing::graphics::transform ( const xtd::drawing::drawing2d::matrix & value )

Sets a copy of the geometric world transformation for this xtd::drawing::graphics.

Parameters
 value A copy of the xtd::drawing::drawing2d::matrix that represents the geometric world transformation for this xtd::drawing::graphics.
Returns
This current instance.
Remarks
GDI+ uses three coordinate spaces: world, page, and device. World coordinates are the coordinates used to model a particular graphic world and are the coordinates you pass to methods in the .NET Framework. Page coordinates refer to the coordinate system used by a drawing surface, such as a form or a control. Device coordinates are the coordinates used by the physical device being drawn on, such as a screen or a printer. The xtd::drawing::graphics::transform property represents the world transformation, which maps world coordinates to page coordinates.
Because the matrix returned and by the xtd::drawing::graphics::transform property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.

## ◆ translate_clip() [1/2]

 void xtd::drawing::graphics::translate_clip ( int32_t dx, int32_t dy )

Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions.

Parameters
 dx The x-coordinate of the translation. dy The y-coordinate of the translation.

## ◆ translate_clip() [2/2]

 void xtd::drawing::graphics::translate_clip ( float dx, float dy )

Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions.

Parameters
 dx The x-coordinate of the translation. dy The y-coordinate of the translation.

## ◆ translate_transform() [1/2]

 void xtd::drawing::graphics::translate_transform ( float dx, float dy )

Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this xtd::drawing::graphics.

Parameters
 dx The x-coordinate of the translation. dy The y-coordinate of the translation.
Remarks
The translation operation consists of multiplying the transformation matrix by a matrix whose translation part is the dx and dy parameters. This method prepends or appends the transformation matrix of the xtd::drawing::graphics by the translation matrix according to the order parameter.

## ◆ translate_transform() [2/2]

 void xtd::drawing::graphics::translate_transform ( float dx, float dy, xtd::drawing::drawing2d::matrix_order order )

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

Parameters
 dx The x-coordinate of the translation. dy The y-coordinate of the translation. order Member of the xtd::drawing::drawing2d::matrix_order enumeration that specifies whether the translation is prepended or appended to the transformation matrix.
Remarks
The translation operation consists of multiplying the transformation matrix by a matrix whose translation part is the dx and dy parameters. This method prepends or appends the transformation matrix of the xtd::drawing::graphics by the translation matrix according to the order parameter.

## ◆ trim_string()

 xtd::ustring xtd::drawing::graphics::trim_string ( const xtd::ustring & text, const xtd::drawing::font & font, float width, xtd::drawing::string_trimming trimming )

Trims the specified string for a specified width with the specified xtd::drawing::font and with the specified xtd::drawing::string_trimming.

Parameters
 text xtd::ustring to measure. font xtd::drawing::font that defines the text format of the string. width Specifies the maximum width for the text. trimming One of xtd::drawing::string_trimming values.

## ◆ visible_clip_bounds()

 xtd::drawing::rectangle_f xtd::drawing::graphics::visible_clip_bounds ( ) const
noexcept

Gets the bounding rectangle of the visible clipping region of this xtd::drawing::graphics.

Returns
A xtd::drawing::rectangle_f structure that represents a bounding rectangle for the visible clipping region of this xtd::drawing::graphics.
Remarks
The unit for resulting rectangle is designated by the xtd::drawing::graphics::page_unit property. The default unit is pixels. A xtd::drawing::graphics is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
The visible clipping region is the intersection of the clipping region of this xtd::drawing::graphics::graphics and the clipping region of the window.

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