xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::graphics Class Reference
Inheritance diagram for xtd::drawing::graphics:
xtd::object

Definition

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

Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics.hpp:70
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
Inheritance
xtd::objectxtd::drawing::graphics
Namespace
xtd::drawing
Library
xtd.drawing
Examples
fill_ellipse.cpp, fill_rectangle.cpp, fill_rounded_rectangle.cpp, graph_control.cpp, graphics.cpp, hello_world_png.cpp, and image_converter.cpp.

Public Properties

xtd::drawing::region clip () const noexcept
 Gets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics.
 
graphicsclip (const xtd::drawing::region value)
 Sets a xtd::drawing::region that limits the drawing region of this xtd::drawing::graphics.
 
xtd::drawing::rectangle_f clip_bounds () const noexcept
 Gets a xtd::drawing::rectangle_f structure that bounds the clipping region of this xtd::drawing::graphics.
 
xtd::drawing::drawing_2d::compositing_mode compositing_mode () const noexcept
 Gets a value that specifies how composited images are drawn to this xtd::drawing::graphics.
 
graphicscompositing_mode (xtd::drawing::drawing_2d::compositing_mode value)
 Sets a value that specifies how composited images are drawn to this xtd::drawing::graphics.
 
xtd::drawing::drawing_2d::compositing_quality compositing_quality () const noexcept
 Gets the rendering quality of composited images drawn to this xtd::drawing::graphics.
 
graphicscompositing_quality (xtd::drawing::drawing_2d::compositing_quality value)
 Sets the rendering quality of composited images drawn to this xtd::drawing::graphics.
 
float dpi_x () const noexcept
 Gets the horizontal resolution of this xtd::drawing::graphics.
 
float dpi_y () const noexcept
 Gets the vertical resolution of this xtd::drawing::graphics.
 
intptr handle () const noexcept
 Gets the handle device context that the graphics is bound to.
 
xtd::drawing::drawing_2d::interpolation_mode interpolation_mode () const noexcept
 Gets the interpolation mode associated with this xtd::drawing::graphics.
 
graphicsinterpolation_mode (xtd::drawing::drawing_2d::interpolation_mode value) noexcept
 Sets the interpolation mode associated with this xtd::drawing::graphics.
 
float page_scale () const noexcept
 Gets the scaling between world units and page units for this xtd::drawing::graphics.
 
graphicspage_scale (float value) noexcept
 Sets the scaling between world units and page units for this xtd::drawing::graphics.
 
xtd::drawing::graphics_unit page_unit () const noexcept
 Gets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics.
 
graphicspage_unit (xtd::drawing::graphics_unit value)
 Sets or sets the unit of measure used for page coordinates in this xtd::drawing::graphics.
 
xtd::drawing::drawing_2d::pixel_offset_mode pixel_offset_mode () const noexcept
 Gets a value specifying how pixels are offset during rendering of this xtd::drawing::graphics.
 
graphicspixel_offset_mode (xtd::drawing::drawing_2d::pixel_offset_mode value) noexcept
 Sets a value specifying how pixels are offset during rendering of this xtd::drawing::graphics.
 
xtd::drawing::drawing_2d::smoothing_mode smoothing_mode () const noexcept
 Gets the rendering quality for this xtd::drawing::graphics.
 
graphicssmoothing_mode (xtd::drawing::drawing_2d::smoothing_mode value) noexcept
 Sets the rendering quality for this xtd::drawing::graphics.
 
int32 text_contrast () const noexcept
 Gets the gamma correction value for rendering text.
 
graphicstext_contrast (int32 value) noexcept
 Sets the gamma correction value for rendering text.
 
xtd::drawing::text::text_rendering_hint text_rendering_hint () const noexcept
 Gets the rendering mode for text associated with this xtd::drawing::graphics.
 
graphicstext_rendering_hint (xtd::drawing::text::text_rendering_hint value)
 Sets the rendering mode for text associated with this xtd::drawing::graphics.
 
xtd::drawing::drawing_2d::matrix transform () const noexcept
 Gets a copy of the geometric world transformation for this xtd::drawing::graphics.
 
graphicstransform (const xtd::drawing::drawing_2d::matrix &value) noexcept
 Sets a copy of the geometric world transformation for this xtd::drawing::graphics.
 
xtd::drawing::rectangle_f visible_clip_bounds () const noexcept
 Gets the bounding rectangle of the visible clipping region of this xtd::drawing::graphics.
 

Public Methods

void clear (const color &color)
 Clears the entire drawing surface and fills it with the specified background color.
 
void copy_from_graphics (const graphics &source, 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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.
 
void copy_from_graphics (const graphics &source, 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 xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.
 
void copy_from_graphics (const graphics &source, int32 source_x, int32 source_y, int32 destination_x, int32 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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.
 
void copy_from_graphics (const graphics &source, int32 source_x, int32 source_y, int32 destination_x, int32 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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.
 
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.
 
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.
 
void copy_from_screen (int32 source_x, int32 source_y, int32 destination_x, int32 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.
 
void copy_from_screen (int32 source_x, int32 source_y, int32 destination_x, int32 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.
 
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.
 
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.
 
void draw_arc (const xtd::drawing::pen &pen, int32 x, int32 y, int32 width, int32 height, int32 start_angle, int32 sweep_angle)
 Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
 
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.
 
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.
 
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.
 
void draw_bezier (const pen &pen, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3, int32 x4, int32 y4)
 Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void draw_ellipse (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect)
 Draws an ellipse specified by a bounding xtd::drawing::rectangle structure.
 
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.
 
void draw_ellipse (const xtd::drawing::pen &pen, int32 x, int32 y, int32 width, int32 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.
 
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.
 
void draw_icon (const xtd::drawing::icon &icon, int32 x, int32 y)
 Draws the image represented by the specified xtd::drawing::icon at the specified coordinates.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void draw_image (const xtd::drawing::image &image, int32 x, int32 y, int32 width, int32 height)
 Draws the specified xtd::drawing::image at the specified location and with the specified size.
 
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.
 
void draw_image (const xtd::drawing::image &image, int32 x, int32 y)
 Draws the specified xtd::drawing::image, using its original physical size, at the specified location.
 
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.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &dest_rect, const xtd::drawing::rectangle &src_rect)
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &dest_rect, const xtd::drawing::rectangle_f &src_rect)
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::point &dest_point, const xtd::drawing::rectangle &src_rect)
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::point_f &dest_point, const xtd::drawing::rectangle_f &src_rect)
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &dest_rect, int32 src_x, int32 src_y, int32 srd_width, int32 src_height)
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &dest_rect, float src_x, float src_y, float srd_width, float src_height)
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::point &dest_point, int32 src_x, int32 src_y, int32 srd_width, int32 src_height)
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
 
void draw_image (const xtd::drawing::image &image, const xtd::drawing::point_f &dest_point, float src_x, float src_y, float srd_width, float src_height)
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
 
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.
 
void draw_image_unscaled (const xtd::drawing::image &image, int32 x, int32 y)
 Draws a specified image using its original physical size at a specified location.
 
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.
 
void draw_image_unscaled (const xtd::drawing::image &image, int32 x, int32 y, int32 width, int32 height)
 Draws a specified image using its original physical size at a specified location.
 
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.
 
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.
 
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.
 
void draw_line (const xtd::drawing::pen &pen, int32 x1, int32 y1, int32 x2, int32 y2)
 Draws a line connecting the two points specified by the coordinate pairs.
 
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.
 
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.
 
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.
 
void draw_path (const xtd::drawing::pen &pen, const xtd::drawing::drawing_2d::graphics_path &path)
 Draws a xtd::drawing::drawing_2d::graphics_path.
 
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.
 
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.
 
void draw_pie (const xtd::drawing::pen &pen, int32 x, int32 y, int32 width, int32 height, int32 start_angle, int32 sweep_angle)
 Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
 
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.
 
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.
 
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.
 
void draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point &point)
 Draws a point specified by the coordinate pairs.
 
void draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point_f &point)
 Draws a point specified by the coordinate pairs.
 
void draw_point (const xtd::drawing::pen &pen, int32 x, int32 y)
 Draws a point specified by the coordinate pairs.
 
void draw_point (const xtd::drawing::pen &pen, float x, float y)
 Draws a point specified by the coordinate pairs.
 
void draw_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect)
 Draws a rectangle specified by a xtd::drawing::rectangle structure.
 
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.
 
void draw_rectangle (const xtd::drawing::pen &pen, int32 x, int32 y, int32 width, int32 height)
 Draws a rectangle specified by a coordinate pair, a width, and a height.
 
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.
 
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.
 
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.
 
void draw_rotated_string (const xtd::string &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.
 
void draw_rotated_string (const xtd::string &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.
 
void draw_rounded_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, int32 radius)
 Draws a rounded rectangle specified by a xtd::drawing::rectangle structure, and radius.
 
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.
 
void draw_rounded_rectangle (const xtd::drawing::pen &pen, int32 x, int32 y, int32 width, int32 height, int32 radius)
 Draws a rounded rectangle specified by a coordinate pair, a width, and a height, and radius.
 
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.
 
void draw_string (const xtd::string &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.
 
void draw_string (const xtd::string &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.
 
void draw_string (const xtd::string &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.
 
void draw_string (const xtd::string &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.
 
void draw_string (const xtd::string &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.
 
void draw_string (const xtd::string &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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing_2d::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.
 
void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::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.
 
void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing_2d::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.
 
void fill_closed_curve (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::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.
 
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.
 
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.
 
void fill_ellipse (const xtd::drawing::brush &brush, int32 x, int32 y, int32 width, int32 height)
 Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
 
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.
 
void fill_path (const xtd::drawing::brush &brush, const xtd::drawing::drawing_2d::graphics_path &path)
 Fills the interior of a xtd::drawing::drawing_2d::graphics_path.
 
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.
 
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.
 
void fill_pie (const xtd::drawing::brush &brush, int32 x, int32 y, int32 width, int32 height, int32 start_angle, int32 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.
 
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.
 
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.
 
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.
 
void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point > &points, xtd::drawing::drawing_2d::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.
 
void fill_polygon (const xtd::drawing::brush &brush, const std::vector< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::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.
 
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.
 
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.
 
void fill_rectangle (const xtd::drawing::brush &brush, int32 x, int32 y, int32 width, int32 height)
 Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
 
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.
 
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.
 
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.
 
void fill_region (const xtd::drawing::brush &brush, const xtd::drawing::region &region)
 Fills the interior of a xtd::drawing::region.
 
void fill_rounded_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect, int32 radius)
 Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle structure.
 
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.
 
void fill_rounded_rectangle (const xtd::drawing::brush &brush, int32 x, int32 y, int32 width, int32 height, int32 radius)
 Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius.
 
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.
 
void flush ()
 Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.
 
void flush (xtd::drawing::drawing_2d::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.
 
intptr get_hdc () const
 Gets the handle to the device context associated with this xtd::drawing::graphics.
 
xtd::drawing::color get_nearest_color (const xtd::drawing::color &color) const
 Gets the nearest color to the specified xtd::drawing::color structure.
 
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.
 
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.
 
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.
 
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.
 
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.
 
bool is_visible (int32 x, int32 y, int32 width, int32 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.
 
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.
 
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.
 
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.
 
bool is_visible (int32 x, int32 y)
 Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics.
 
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.
 
size_f measure_string (const xtd::string &text, const xtd::drawing::font &font)
 Measures the specified string when drawn with the specified xtd::drawing::font.
 
size_f measure_string (const xtd::string &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.
 
size_f measure_string (const xtd::string &text, const xtd::drawing::font &font, int32 width)
 Measures the specified string when drawn with the specified xtd::drawing::font.
 
size_f measure_string (const xtd::string &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.
 
size_f measure_string (const xtd::string &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.
 
size_f measure_string (const xtd::string &text, const xtd::drawing::font &font, int32 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.
 
size_f measure_string (const xtd::string &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.
 
void multiply_transform (const xtd::drawing::drawing_2d::matrix &matrix)
 Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing_2d::matrix.
 
void multiply_transform (const xtd::drawing::drawing_2d::matrix &matrix, xtd::drawing::drawing_2d::matrix_order order)
 Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing_2d::matrix with specified order.
 
void release_hdc (intptr hdc)
 Releases a device context handle obtained by a previous call to the xtd::drawing::graphics::get_hdc() method of this xtd::drawing::graphics.
 
void reset_clip ()
 Resets the clip region of this xtd::drawing::graphics to an infinite region.
 
void reset_transform ()
 Resets the world transformation matrix of this xtd::drawing::graphics to the identity matrix.
 
void restore (const xtd::drawing::drawing_2d::graphics_state &gstate)
 Restores the state of this xtd::drawing::graphics to the state represented by a xtd::drawing::drawing_2d::graphics_state.
 
void rotate_transform (float angle)
 Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics.
 
void rotate_transform (float angle, xtd::drawing::drawing_2d::matrix_order order)
 Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics in the specified order.
 
xtd::drawing::drawing_2d::graphics_state save ()
 Saves the current state of this xtd::drawing::graphics and identifies the saved state with a xtd::drawing::drawing_2d::graphics_state.
 
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.
 
void scale_transform (float sx, float sy, xtd::drawing::drawing_2d::matrix_order order)
 Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics in the specified order.
 
void translate_clip (int32 dx, int32 dy)
 Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions.
 
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.
 
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.
 
void translate_transform (float dx, float dy, xtd::drawing::drawing_2d::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.
 
xtd::string trim_string (const xtd::string &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.
 
xtd::string to_string () const noexcept override
 Returns a xtd::string that represents the current object.
 

Public Static Methods

static graphics from_hdc (intptr hdc)
 Creates a new xtd::drawing::graphics from the specified handle to a device context.
 
static graphics from_hdc (intptr hdc, intptr hdevice)
 Creates a new xtd::drawing::graphics from the specified handle to a device contextand handle to a device.
 
static graphics from_hwnd (intptr hwnd)
 Creates a new xtd::drawing::graphics from the specified handle to a window.
 
static graphics from_image (const xtd::drawing::image &image)
 Creates a new xtd::drawing::graphics from the specified xtd::drawing::image.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Member Function Documentation

◆ clip() [1/2]

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

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
valueA 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
noexcept

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::drawing_2d::compositing_mode xtd::drawing::graphics::compositing_mode ( ) const
noexcept

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::drawing_2d::compositing_mode enumeration. The default is xtd::drawing::drawing_2d::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::drawing_2d::compositing_mode  value)

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

Parameters
valueThis 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::drawing_2d::compositing_quality xtd::drawing::graphics::compositing_quality ( ) const
noexcept

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

Returns
This property specifies a member of the xtd::drawing::drawing_2d::compositing_quality enumeration. The xtd::drawing::drawing_2d::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::drawing_2d::compositing_quality  value)

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

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

◆ dpi_x()

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

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
noexcept

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.

◆ handle()

intptr xtd::drawing::graphics::handle ( ) const
noexcept

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

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

◆ interpolation_mode() [1/2]

xtd::drawing::drawing_2d::interpolation_mode xtd::drawing::graphics::interpolation_mode ( ) const
noexcept

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

Returns
One of the xtd::drawing::drawing_2d::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::drawing_2d::interpolation_mode  value)
noexcept

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

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

◆ page_scale() [1/2]

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

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

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

Parameters
valueThis 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
noexcept

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
valueOne of the xtd::drawing::graphics_unit values other than xtd::drawing::graphics_unit::world.
Returns
This current instance.
Exceptions
xtd::argument_exceptionxtd::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::drawing_2d::pixel_offset_mode xtd::drawing::graphics::pixel_offset_mode ( ) const
noexcept

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::drawing_2d::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::drawing_2d::pixel_offset_mode  value)
noexcept

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

Parameters
valueThis property specifies a member of the xtd::drawing::drawing_2d::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.

◆ smoothing_mode() [1/2]

xtd::drawing::drawing_2d::smoothing_mode xtd::drawing::graphics::smoothing_mode ( ) const
noexcept

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

Returns
One of the xtd::drawing::drawing_2d::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::drawing_2d::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::drawing_2d::smoothing_mode  value)
noexcept

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

Parameters
valueOne of the xtd::drawing::drawing_2d::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::drawing_2d::path_gradient_brush are rendered the same way (aliased) regardless of the xtd::drawing::graphics::smoothing_mode property.

◆ text_contrast() [1/2]

int32 xtd::drawing::graphics::text_contrast ( ) const
noexcept

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 ( int32  value)
noexcept

Sets the gamma correction value for rendering text.

Parameters
valueThe 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
noexcept

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
valueOne 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.

◆ transform() [1/2]

xtd::drawing::drawing_2d::matrix xtd::drawing::graphics::transform ( ) const
noexcept

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

Returns
A copy of the xtd::drawing::drawing_2d::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::drawing_2d::matrix value)
noexcept

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

Parameters
valueA copy of the xtd::drawing::drawing_2d::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.

◆ 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.

◆ clear()

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

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

Parameters
colorxtd::drawing::color structure that represents the background color of the drawing surface.
Examples
graphics.cpp.

◆ copy_from_graphics() [1/4]

void xtd::drawing::graphics::copy_from_graphics ( const graphics source,
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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.

Parameters
sourceThe drawing surface of the xtd::drawing::graphics source.
upper_left_sourceThe point at the upper-left corner of the source rectangle.
upper_left_destinationThe point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
Remarks
The xtd::drawing::graphics::copy_from_graphics 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_graphics() [2/4]

void xtd::drawing::graphics::copy_from_graphics ( const graphics source,
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 xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.

Parameters
sourceThe drawing surface of the xtd::drawing::graphics source.
upper_left_sourceThe point at the upper-left corner of the source rectangle.
upper_left_destinationThe point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
copy_pixel_operationOne of the xtd::drawing::graphics::copy_pixel_operation values.
Remarks
The xtd::drawing::graphics::copy_from_graphics 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_graphics() [3/4]

void xtd::drawing::graphics::copy_from_graphics ( const graphics source,
int32  source_x,
int32  source_y,
int32  destination_x,
int32  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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.

Parameters
sourceThe drawing surface of the xtd::drawing::graphics source.
source_xThe x-coordinate of the point at the upper-left corner of the source rectangle.
source_yThe y-coordinate of the point at the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the point at the upper-left corner of the destination rectangle.
destination_yThe y-coordinate of the point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
Remarks
The xtd::drawing::graphics::copy_from_graphics 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_graphics() [4/4]

void xtd::drawing::graphics::copy_from_graphics ( const graphics source,
int32  source_x,
int32  source_y,
int32  destination_x,
int32  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 drawing surface of the xtd::drawing::graphics source to the drawing surface of the xtd::drawing::graphics.

Parameters
sourceThe drawing surface of the xtd::drawing::graphics source.
source_xThe x-coordinate of the point at the upper-left corner of the source rectangle.
source_yThe y-coordinate of the point at the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the point at the upper-left corner of the destination rectangle.
destination_yThe y-coordinate of the point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
copy_pixel_operationOne of the xtd::drawing::graphics::copy_pixel_operation values.
Remarks
The xtd::drawing::graphics::copy_from_graphics 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() [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_sourceThe point at the upper-left corner of the source rectangle.
upper_left_destinationThe point at the upper-left corner of the destination rectangle.
block_region_sizeThe 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_sourceThe point at the upper-left corner of the source rectangle.
upper_left_destinationThe point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
copy_pixel_operationOne 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  source_x,
int32  source_y,
int32  destination_x,
int32  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_xThe x-coordinate of the point at the upper-left corner of the source rectangle.
source_yThe y-coordinate of the point at the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the point at the upper-left corner of the destination rectangle.
destination_yThe y-coordinate of the point at the upper-left corner of the destination rectangle.
block_region_sizeThe 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  source_x,
int32  source_y,
int32  destination_x,
int32  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_xThe x-coordinate of the point at the upper-left corner of the source rectangle.
source_yThe y-coordinate of the point at the upper-left corner of the source rectangle.
destination_xThe x-coordinate of the point at the upper-left corner of the destination rectangle.
destination_yThe y-coordinate of the point at the upper-left corner of the destination rectangle.
block_region_sizeThe size of the area to be transferred.
copy_pixel_operationOne 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.

◆ 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
penxtd::drawing::pen that determines the color, width, and style of the arc.
rectxtd::drawing::rectangle structure that defines the boundaries of the ellipse.
start_angleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
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
penxtd::drawing::pen that determines the color, width, and style of the arc.
rectxtd::drawing::rectangle_f structure that defines the boundaries of the ellipse.
start_angleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
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  x,
int32  y,
int32  width,
int32  height,
int32  start_angle,
int32  sweep_angle 
)

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

Parameters
penxtd::drawing::pen that determines the color, width, and style of the arc.
xThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthWidth of the rectangle that defines the ellipse.
heightHeight of the rectangle that defines the ellipse.
start_angleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
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
penxtd::drawing::pen that determines the color, width, and style of the arc.
xThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthWidth of the rectangle that defines the ellipse.
heightHeight of the rectangle that defines the ellipse.
start_angleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to ending point of the arc.
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
penxtd::drawing::pen structure that determines the color, width, and style of the curve.
pt1xtd::drawing::point structure that represents the starting point of the curve.
pt2xtd::drawing::point structure that represents the first control point for the curve.
pt3xtd::drawing::point structure that represents the second control point for the curve.
pt4xtd::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
penxtd::drawing::pen structure that determines the color, width, and style of the curve.
pt1xtd::drawing::point structure that represents the starting point of the curve.
pt2xtd::drawing::point structure that represents the first control point for the curve.
pt3xtd::drawing::point structure that represents the second control point for the curve.
pt4xtd::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  x1,
int32  y1,
int32  x2,
int32  y2,
int32  x3,
int32  y3,
int32  x4,
int32  y4 
)

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

Parameters
penxtd::drawing::pen structure that determines the color, width, and style of the curve.
x1The x-coordinate of the starting point of the curve.
y1The y-coordinate of the starting point of the curve.
x2The x-coordinate of the first control point of the curve.
y2The y-coordinate of the first control point of the curve.
x3The x-coordinate of the second control point of the curve.
y3The y-coordinate of the second control point of the curve.
x4The x-coordinate of the ending point of the curve.
y4The y-coordinate of the ending point of the curve.
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
penxtd::drawing::pen structure that determines the color, width, and style of the curve.
x1The x-coordinate of the starting point of the curve.
y1The y-coordinate of the starting point of the curve.
x2The x-coordinate of the first control point of the curve.
y2The y-coordinate of the first control point of the curve.
x3The x-coordinate of the second control point of the curve.
y3The y-coordinate of the second control point of the curve.
x4The x-coordinate of the ending point of the curve.
y4The y-coordinate of the ending point of the curve.
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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point structures that define the spline.
tensionalue 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point_f structures that define the spline.
tensionalue 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point structures that define the spline.
tensionValue 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point_f structures that define the spline.
tensionValue 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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point_f structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
tensionValue greater than or equal to 0.0F that specifies the tension of the curve.
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
penxtd::drawing::pen that determines the color, width, and style of the curve.
pointsArray of xtd::drawing::point_f structures that define the spline.
offsetOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsNumber of segments after the starting point to include in the curve.
tensionValue greater than or equal to 0.0F that specifies the tension of the curve.
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
penxtd::drawing::pen that determines the color, width, and style of the ellipse.
rectxtd::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_ellipse.cpp, fill_rectangle.cpp, fill_rounded_rectangle.cpp, and graphics.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
penxtd::drawing::pen that determines the color, width, and style of the ellipse.
rectxtd::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  x,
int32  y,
int32  width,
int32  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
penxtd::drawing::pen that determines the color, width, and style of the ellipse.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
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
penxtd::drawing::pen that determines the color, width, and style of the ellipse.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
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  x,
int32  y 
)

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

Parameters
iconxtd::drawing::icon to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.

◆ 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
iconxtd::drawing::icon to draw.
rectxtd::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
iconxtd::drawing::icon to draw.
rectxtd::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/16]

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
imagextd::drawing::image to draw.
rectxtd::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/16]

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
imagextd::drawing::image to draw.
rectxtd::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/16]

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
imagextd::drawing::image to draw.
pointxtd::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/16]

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
imagextd::drawing::image to draw.
pointxtd::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/16]

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

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

Parameters
imagextd::drawing::image to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
widthWidth of the drawn image.
heightHeight 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/16]

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
imagextd::drawing::image to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
widthWidth of the drawn image.
heightHeight 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/16]

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

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

Parameters
imagextd::drawing::image to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
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/16]

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
imagextd::drawing::image to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
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() [9/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::rectangle dest_rect,
const xtd::drawing::rectangle src_rect 
)

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

Parameters
imagextd::drawing::image to draw.
rectxtd::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() [10/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::rectangle_f dest_rect,
const xtd::drawing::rectangle_f src_rect 
)

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

Parameters
imagextd::drawing::image to draw.
rectxtd::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() [11/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::point dest_point,
const xtd::drawing::rectangle src_rect 
)

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

Parameters
imagextd::drawing::image to draw.
pointxtd::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() [12/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::point_f dest_point,
const xtd::drawing::rectangle_f src_rect 
)

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

Parameters
imagextd::drawing::image to draw.
pointxtd::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() [13/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::rectangle dest_rect,
int32  src_x,
int32  src_y,
int32  srd_width,
int32  src_height 
)

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

Parameters
imagextd::drawing::image to draw.
rectxtd::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() [14/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::rectangle_f dest_rect,
float  src_x,
float  src_y,
float  srd_width,
float  src_height 
)

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

Parameters
imagextd::drawing::image to draw.
rectxtd::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() [15/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::point dest_point,
int32  src_x,
int32  src_y,
int32  srd_width,
int32  src_height 
)

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

Parameters
imagextd::drawing::image to draw.
pointxtd::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() [16/16]

void xtd::drawing::graphics::draw_image ( const xtd::drawing::image image,
const xtd::drawing::point_f dest_point,
float  src_x,
float  src_y,
float  srd_width,
float  src_height 
)

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

Parameters
imagextd::drawing::image to draw.
pointxtd::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_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
imagextd::drawing::image to draw.
pointxtd::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  x,
int32  y 
)

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

Parameters
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
imagextd::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
imagextd::drawing::image to draw.
rectxtd::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  x,
int32  y,
int32  width,
int32  height 
)

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

Parameters
imagextd::drawing::image to draw.
xThe x-coordinate of the upper-left corner of the drawn image.
yThe y-coordinate of the upper-left corner of the drawn image.
widthnot used.
heightnot 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
imagextd::drawing::image to draw.
rectThe 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
penxtd::drawing::pen that determines the color, width, and style of the line.
pt1xtd::drawing::point structure that represents the first point to connect.
pt2xtd::drawing::point structure that represents the second point to connect.
Examples
graph_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
penxtd::drawing::pen that determines the color, width, and style of the line.
pt1xtd::drawing::point_f structure that represents the first point to connect.
pt2xtd::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  x1,
int32  y1,
int32  x2,
int32  y2 
)

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

Parameters
penxtd::drawing::pen that determines the color, width, and style of the line.
x1The x-coordinate of the first point.
y1The y-coordinate of the first point.
x2The x-coordinate of the second point.
y2The y-coordinate of the second point.
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
penxtd::drawing::pen that determines the color, width, and style of the line.
x1The x-coordinate of the first point.
y1The y-coordinate of the first point.
x2The x-coordinate of the second point.
y2The y-coordinate of the second point.
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
penxtd::drawing::pen that determines the color, width, and style of the line segments.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the line segments.
pointsArray 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::drawing_2d::graphics_path path 
)

Draws a xtd::drawing::drawing_2d::graphics_path.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the path.
pathxtd::drawing::drawing_2d::graphics_path to draw.
Remarks
The current transformation in the graphic context is applied to the xtd::drawing::drawing_2d::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
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
rectxtd::drawing::rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
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
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
rectxtd::drawing::rectangle_f structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
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  x,
int32  y,
int32  width,
int32  height,
int32  start_angle,
int32  sweep_angle 
)

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

Parameters
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heughtHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
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
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heughtHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
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_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
penxtd::drawing::pen that determines the color, width, and style of the polygon.
pointsArray 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
penxtd::drawing::pen that determines the color, width, and style of the polygon.
pointsArray 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_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
penxtd::drawing::pen that determines the color, width, and style of the point.
pointxtd::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
penxtd::drawing::pen that determines the color, width, and style of the point.
pointxtd::drawing::point_f structure that represents the point.

◆ draw_point() [3/4]

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

Draws a point specified by the coordinate pairs.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the point.
x1The x-coordinate of the point.
y1The 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
penxtd::drawing::pen that determines the color, width, and style of the point.
x1The x-coordinate of the point.
y1The y-coordinate of the point.

◆ 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
penA xtd::drawing::pen that determines the color, width, and style of the rectangle.
rectA xtd::drawing::rectangle structure that represents the rectangle to draw.

◆ 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
penA xtd::drawing::pen that determines the color, width, and style of the rectangle.
rectA 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  x,
int32  y,
int32  width,
int32  height 
)

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

Parameters
penA xtd::drawing::pen that determines the color, width, and style of the rectangle.
xThe x-coordinate of the upper-left corner of the rectangle to draw.
yThe y-coordinate of the upper-left corner of the rectangle to draw.
widthThe width of the rectangle to draw.
heightThe height of the rectangle to draw.

◆ 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
penA xtd::drawing::pen that determines the color, width, and style of the rectangle.
xThe x-coordinate of the upper-left corner of the rectangle to draw.
yThe y-coordinate of the upper-left corner of the rectangle to draw.
widthThe width of the rectangle to draw.
heightThe height of the rectangle to draw.

◆ 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
penxtd::drawing::pen that determines the color, width, and style of the outlines of the rectangles.
rectsArray 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
penxtd::drawing::pen that determines the color, width, and style of the outlines of the rectangles.
rectsArray 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::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
pointxtd::drawing::point_f structure that specifies the upper-left corner of the drawn text.
angleThe 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::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
xThe x-coordinate of the upper-left corner of the drawn text.
yThe y-coordinate of the upper-left corner of the drawn text.
angleThe angle, measured in degrees clockwise from the x-axis, of the text's orientation line.

◆ draw_rounded_rectangle() [1/4]

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

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

Parameters
penA xtd::drawing::pen that determines the color, width, and style of the rounded rectangle.
rectA xtd::drawing::rectangle structure that represents the rounded rectangle to draw.
radiusThe 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
penA xtd::drawing::pen that determines the color, width, and style of the rounded rectangle.
rectA xtd::drawing::rectangle_f structure that represents the rounded rectangle to draw.
radiusThe radius of the rounded rectange angles.

◆ draw_rounded_rectangle() [3/4]

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

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

Parameters
penA xtd::drawing::pen that determines the color, width, and style of the rounded rectangle.
xThe x-coordinate of the upper-left corner of the rounded rectangle to draw.
yThe y-coordinate of the upper-left corner of the rounded rectangle to draw.
widthThe width of the rounded rectangle to draw.
heightThe height of the rounded rectangle to draw.
radiusThe radius of the rounded rectange angles.

◆ 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
penA xtd::drawing::pen that determines the color, width, and style of the rounded rectangle.
xThe x-coordinate of the upper-left corner of the rounded rectangle to draw.
yThe y-coordinate of the upper-left corner of the rounded rectangle to draw.
widthThe width of the rounded rectangle to draw.
heightThe height of the rounded rectangle to draw.
radiusThe radius of the rounded rectange angles.

◆ draw_string() [1/6]

void xtd::drawing::graphics::draw_string ( const xtd::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
layout_rectanglextd::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
graphics.cpp, and hello_world_png.cpp.

◆ draw_string() [2/6]

void xtd::drawing::graphics::draw_string ( const xtd::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
layout_rectanglextd::drawing::rectangle_f structure that specifies the location of the drawn text.
formatxtd::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::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
pointxtd::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::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
pointxtd::drawing::point_f structure that specifies the upper-left corner of the drawn text.
formatxtd::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::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
xThe x-coordinate of the upper-left corner of the drawn text.
yThe y-coordinate of the upper-left corner of the drawn text.

◆ draw_string() [6/6]

void xtd::drawing::graphics::draw_string ( const xtd::string 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
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
xThe x-coordinate of the upper-left corner of the drawn text.
yThe y-coordinate of the upper-left corner of the drawn text.
formatxtd::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
regionxtd::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
rectxtd::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
rectxtd::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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray 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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray 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::drawing_2d::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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point structures that define the spline.
fill_modeMember of the xtd::drawing::drawing_2d::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::drawing_2d::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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point_f structures that define the spline.
fill_modeMember of the xtd::drawing::drawing_2d::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::drawing_2d::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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point structures that define the spline.
fill_modeMember of the xtd::drawing::drawing_2d::fill_mode enumeration that determines how the curve is filled.
tensionValue 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::drawing_2d::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
brushA xtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point_f structures that define the spline.
fill_modeMember of the xtd::drawing::drawing_2d::fill_mode enumeration that determines how the curve is filled.
tensionValue 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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::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_ellipse.cpp, fill_rectangle.cpp, fill_rounded_rectangle.cpp, and graphics.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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::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  x,
int32  y,
int32  width,
int32  height 
)

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

Parameters
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthWidth of the bounding rectangle that defines the ellipse.
heightHeight of the bounding rectangle that defines the ellipse.
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::drawing_2d::graphics_path path 
)

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

Parameters
brushxtd::drawing::brush that determines the characteristics of the fill.
pathxtd::drawing::drawing_2d::graphics_path that represents the path to fill.
Remarks
A xtd::drawing::drawing_2d::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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::drawing::rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::drawing::rectangle_f structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
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  x,
int32  y,
int32  width,
int32  height,
int32  start_angle,
int32  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
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleAngle in degrees measured clockwise from the start_angle parameter to the second side of the pie section.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
pointsArray 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.
Examples
graphics.cpp.

◆ 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
brushxtd::drawing::brush that determines the characteristics of the fill.
pointsArray 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::drawing_2d::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
brushxtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point structures that represent the vertices of the polygon to fill.
fill_modeMember of the xtd::drawing::drawing_2d::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::drawing_2d::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
brushxtd::drawing::brush that determines the characteristics of the fill.
pointsArray of xtd::drawing::point_f structures that represent the vertices of the polygon to fill.
fill_modeMember of the xtd::drawing::drawing_2d::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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::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
graphics.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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::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  x,
int32  y,
int32  width,
int32  height 
)

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

Parameters
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rectangle to fill.
yThe y-coordinate of the upper-left corner of the rectangle to fill.
widthWidth of the rectangle to fill.
heightHeight of the rectangle to fill.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rectangle to fill.
yThe y-coordinate of the upper-left corner of the rectangle to fill.
widthWidth of the rectangle to fill.
heightHeight of the rectangle to fill.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectsArray 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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectsArray 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
brushxtd::drawing::brush that determines the characteristics of the fill.
regionxtd::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  radius 
)

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

Parameters
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::drawing::rectangle structure that represents the rounded rectangle to fill.
radiusThe 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
brushxtd::drawing::brush that determines the characteristics of the fill.
rectxtd::drawing::rectangle_f structure that represents the rounded rectangle to fill.
radiusThe 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  x,
int32  y,
int32  width,
int32  height,
int32  radius 
)

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

Parameters
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rounded rectangle to fill.
yThe y-coordinate of the upper-left corner of the rounded rectangle to fill.
widthWidth of the rounded rectangle to fill.
heightHeight of the rounded rectangle to fill.
radiusThe radius of the rounded rectange angles.
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
brushxtd::drawing::brush that determines the characteristics of the fill.
xThe x-coordinate of the upper-left corner of the rounded rectangle to fill.
yThe y-coordinate of the upper-left corner of the rounded rectangle to fill.
widthWidth of the rounded rectangle to fill.
heightHeight of the rounded rectangle to fill.
radiusThe radius of the rounded rectange angles.
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::drawing_2d::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
intentionMember of the xtd::drawing::drawing_2d::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::drawing_2d::flush_intention::sync specifies that the method wait before returning until any existing operations finish.

◆ get_hdc()

intptr 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
colorxtd::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.

◆ 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
regionxtd::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
rectxtd::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
rectxtd::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
rectxtd::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
rectxtd::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  x,
int32  y,
int32  width,
int32  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
xThe x-coordinate of the upper-left corner of the rectangle to test for visibility.
yThe y-coordinate of the upper-left corner of the rectangle to test for visibility.
widthWidth of the rectangle to test for visibility.
heightHeight 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
xThe x-coordinate of the upper-left corner of the rectangle to test for visibility.
yThe y-coordinate of the upper-left corner of the rectangle to test for visibility.
widthWidth of the rectangle to test for visibility.
heightHeight 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
pointxtd::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
pointxtd::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  x,
int32  y 
)

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

Parameters
xThe x-coordinate of the point to test for visibility.
yThe 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
xThe x-coordinate of the point to test for visibility.
yThe 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::string text,
const xtd::drawing::font font 
)

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

Parameters
textxtd::string to measure.
fontxtd::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.

◆ measure_string() [2/7]

size_f xtd::drawing::graphics::measure_string ( const xtd::string 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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
layout_areaxtd::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::string text,
const xtd::drawing::font font,
int32  width 
)

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

Parameters
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
widthMaximum 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::string 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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
originxtd::drawing::point_f structure that represents the upper-left corner of the string.
formatxtd::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::string 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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
layout_areaxtd::drawing::size_f structure that specifies the maximum layout area for the text.
formatxtd::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::string text,
const xtd::drawing::font font,
int32  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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
widthMaximum width of the string in pixels.
formatxtd::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::string 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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
layout_areaxtd::drawing::size_f structure that specifies the maximum layout area for the text.
formatxtd::drawing::string_format that represents formatting information, such as line spacing, for the string.
characters_fittedNumber of characters in the string.
lines_filledNumber 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::drawing_2d::matrix matrix)

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

Parameters
matrix4x4 xtd::drawing::drawing_2d::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::drawing_2d::matrix matrix,
xtd::drawing::drawing_2d::matrix_order  order 
)

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

Parameters
matrix4x4 xtd::drawing::drawing_2d::matrix that multiplies the world transformation.
orderMember of the xtd::drawing::drawing_2d::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.

◆ release_hdc()

void xtd::drawing::graphics::release_hdc ( intptr  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
hdcHandle 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::drawing_2d::graphics_state gstate)

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

Parameters
gstatextd::drawing::drawing_2d::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::drawing_2d::graphics_state that identifies that information block. When you pass the identifying xtd::drawing::drawing_2d::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::drawing_2d::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::drawing_2d::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::drawing_2d::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
angleAngle 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::drawing_2d::matrix_order  order 
)

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

Parameters
angleAngle of rotation in degrees.
orderMember of the xtd::drawing::drawing_2d::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::drawing_2d::graphics_state xtd::drawing::graphics::save ( )

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

Returns
This method returns a xtd::drawing::drawing_2d::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::drawing_2d::graphics_state that identifies that information block. When you pass the identifying xtd::drawing::drawing_2d::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::drawing_2d::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::drawing_2d::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::drawing_2d::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
sxScale factor in the x direction.
syScale 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::drawing_2d::matrix_order  order 
)

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

Parameters
sxScale factor in the x direction.
syScale factor in the y direction.
orderMember of the xtd::drawing::drawing_2d::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.

◆ translate_clip() [1/2]

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

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

Parameters
dxThe x-coordinate of the translation.
dyThe 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
dxThe x-coordinate of the translation.
dyThe 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
dxThe x-coordinate of the translation.
dyThe 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::drawing_2d::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
dxThe x-coordinate of the translation.
dyThe y-coordinate of the translation.
orderMember of the xtd::drawing::drawing_2d::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::string xtd::drawing::graphics::trim_string ( const xtd::string 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
textxtd::string to measure.
fontxtd::drawing::font that defines the text format of the string.
widthSpecifies the maximum width for the text.
trimmingOne of xtd::drawing::string_trimming values.

◆ to_string()

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

Returns a xtd::string that represents the current object.

Returns
A string that represents the current object.
Examples
The following code example demonstrates what to_string returns.
#include <xtd/xtd>
using namespace xtd;
namespace examples {
namespace object_test {
class object1 : public object {
};
}
}
auto main() -> int {
ptr<object> obj1 = new_ptr<examples::object_test::object1>();
console::write_line(obj1->to_string());
ptr<object> obj2 = new_ptr<date_time>(1971, 1, 5, 23, 5, 0);
console::write_line(obj2->to_string());
ptr<object> obj3 = new_ptr<boolean_object>();
console::write_line(obj3->to_string());
}
// This code produces the following output :
//
// examples::object_test::object1
// Tue Jan 5 23:05:00 1971
// false
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10

Reimplemented from xtd::object.

◆ from_hdc() [1/2]

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

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

Parameters
hdcHandle 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  hdc,
intptr  hdevice 
)
static

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

Parameters
hdcHandle to a device context.
hdeviceHandle to a device.
Returns
This method returns a new 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  hwnd)
static

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

Parameters
hwndHandle 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
imagextd::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::string, 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.

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