xtd 1.0.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.

class drawing_export_ graphics : public xtd::object
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
Inheritance
xtd::objectxtd::drawing::graphics
Namespace
xtd::drawing
Library
xtd.drawing
Examples
graphics.cpp, and hello_world_png.cpp.

Public Properties

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

Public Methods

auto clear (const xtd::drawing::color &color) -> void
 Clears the entire drawing surface and fills it with the specified background color.
auto 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) -> void
 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.
auto 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) -> void
 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.
auto copy_from_graphics (const graphics &source, xtd::int32 source_x, xtd::int32 source_y, xtd::int32 destination_x, xtd::int32 destination_y, const xtd::drawing::size &block_region_size) -> void
 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.
auto copy_from_graphics (const graphics &source, xtd::int32 source_x, xtd::int32 source_y, xtd::int32 destination_x, xtd::int32 destination_y, const xtd::drawing::size &block_region_size, xtd::drawing::copy_pixel_operation copy_pixel_operation) -> void
 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.
auto copy_from_screen (const xtd::drawing::point &upper_left_source, const xtd::drawing::point &upper_left_destination, const xtd::drawing::size &block_region_size) -> void
 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.
auto 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) -> void
 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.
auto copy_from_screen (xtd::int32 source_x, xtd::int32 source_y, xtd::int32 destination_x, xtd::int32 destination_y, const xtd::drawing::size &block_region_size) -> void
 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.
auto copy_from_screen (xtd::int32 source_x, xtd::int32 source_y, xtd::int32 destination_x, xtd::int32 destination_y, const xtd::drawing::size &block_region_size, xtd::drawing::copy_pixel_operation copy_pixel_operation) -> void
 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.
auto draw_arc (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle) -> void
 Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure.
auto draw_arc (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle) -> void
 Draws an arc representing a portion of an ellipse specified by a xtd::drawing::rectangle structure.
auto draw_arc (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::int32 start_angle, xtd::int32 sweep_angle) -> void
 Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
auto draw_arc (const xtd::drawing::pen &pen, float x, float y, float width, float height, float start_angle, float sweep_angle) -> void
 Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
auto 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) -> void
 Draws a Bézier spline defined by four Point structures.
auto 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) -> void
 Draws a Bézier spline defined by four Point structures.
auto draw_bezier (const pen &pen, xtd::int32 x1, xtd::int32 y1, xtd::int32 x2, xtd::int32 y2, xtd::int32 x3, xtd::int32 y3, xtd::int32 x4, xtd::int32 y4) -> void
 Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
auto draw_bezier (const pen &pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) -> void
 Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
auto draw_beziers (const pen &pen, const xtd::array< xtd::drawing::point > &points) -> void
 Draws a series of Bézier splines from an array of xtd::drawing::point structures.
auto draw_beziers (const pen &pen, const xtd::array< xtd::drawing::point_f > &points) -> void
 Draws a series of Bézier splines from an array of xtd::drawing::point_f structures.
auto draw_closed_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points) -> void
 Draws a closed cardinal spline defined by an array of xtd::drawing::point structures.
auto draw_closed_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points) -> void
 Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures.
auto draw_closed_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points, float tension) -> void
 Draws a closed cardinal spline defined by an array of xtd::drawing::point structures using a specified tension.
auto draw_closed_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points, float tension) -> void
 Draws a closed cardinal spline defined by an array of xtd::drawing::point_f structures using a specified tension.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point structures.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point_f structures.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points, float tension) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point structures using a specified tension.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points, float tension) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point_f structures using a specified tension.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points, xtd::usize offset, xtd::usize number_of_segments) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point structures. The drawing begins offset from the beginning of the array.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points, xtd::usize offset, xtd::usize number_of_segments) -> void
 Draws a cardinal spline through a specified array of xtd::drawing::point_f structures. The drawing begins offset from the beginning of the array.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point > &points, xtd::usize offset, xtd::usize number_of_segments, float tension) -> void
 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.
auto draw_curve (const pen &pen, const xtd::array< xtd::drawing::point_f > &points, xtd::usize offset, xtd::usize number_of_segments, float tension) -> void
 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.
auto draw_ellipse (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect) -> void
 Draws an ellipse specified by a bounding xtd::drawing::rectangle structure.
auto draw_ellipse (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect) -> void
 Draws an ellipse specified by a bounding xtd::drawing::rectangle_f structure.
auto draw_ellipse (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.
auto draw_ellipse (const xtd::drawing::pen &pen, float x, float y, float width, float height) -> void
 Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.
auto draw_icon (const xtd::drawing::icon &icon, xtd::int32 x, xtd::int32 y) -> void
 Draws the image represented by the specified xtd::drawing::icon at the specified coordinates.
auto draw_icon (const xtd::drawing::icon &icon, const xtd::drawing::rectangle &rect) -> void
 Draws the image represented by the specified xtd::drawing::icon within the area specified by a xtd::drawing::rectangle structure.
auto draw_icon_unstretched (const xtd::drawing::icon &icon, const xtd::drawing::rectangle &rect) -> void
 Draws the image represented by the specified Icon without scaling the image.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect) -> void
 Draws the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &rect) -> void
 Draws the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::point &point) -> void
 Draws the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::point_f &point) -> void
 Draws the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Draws the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, float x, float y, float width, float height) -> void
 Draws the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, xtd::int32 x, xtd::int32 y) -> void
 Draws the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, float x, float y) -> void
 Draws the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &dest_rect, const xtd::drawing::rectangle &src_rect) -> void
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &dest_rect, const xtd::drawing::rectangle_f &src_rect) -> void
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::point &dest_point, const xtd::drawing::rectangle &src_rect) -> void
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::point_f &dest_point, const xtd::drawing::rectangle_f &src_rect) -> void
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::rectangle &dest_rect, xtd::int32 src_x, xtd::int32 src_y, xtd::int32 srd_width, xtd::int32 src_height) -> void
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
auto 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) -> void
 Draws the specified protion of the specified xtd::drawing::image at the specified location and with the specified size.
auto draw_image (const xtd::drawing::image &image, const xtd::drawing::point &dest_point, xtd::int32 src_x, xtd::int32 src_y, xtd::int32 srd_width, xtd::int32 src_height) -> void
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
auto 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) -> void
 Draws the specified protion of the specified xtd::drawing::image, using its original physical size, at the specified location.
auto draw_image_unscaled (const xtd::drawing::image &image, const xtd::drawing::point &point) -> void
 Draws a specified image using its original physical size at a specified location.
auto draw_image_unscaled (const xtd::drawing::image &image, xtd::int32 x, xtd::int32 y) -> void
 Draws a specified image using its original physical size at a specified location.
auto draw_image_unscaled (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect) -> void
 Draws a specified image using its original physical size at a specified location.
auto draw_image_unscaled (const xtd::drawing::image &image, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Draws a specified image using its original physical size at a specified location.
auto draw_image_unscaled_and_clipped (const xtd::drawing::image &image, const xtd::drawing::rectangle &rect) -> void
 Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
auto draw_line (const xtd::drawing::pen &pen, const xtd::drawing::point &pt1, const point &pt2) -> void
 Draws a line connecting two xtd::drawing::point structures.
auto draw_line (const xtd::drawing::pen &pen, const xtd::drawing::point_f &pt1, const point_f &pt2) -> void
 Draws a line connecting two xtd::drawing::point_f structures.
auto draw_line (const xtd::drawing::pen &pen, xtd::int32 x1, xtd::int32 y1, xtd::int32 x2, xtd::int32 y2) -> void
 Draws a line connecting the two points specified by the coordinate pairs.
auto draw_line (const xtd::drawing::pen &pen, float x1, float y1, float x2, float y2) -> void
 Draws a line connecting the two points specified by the coordinate pairs.
auto draw_lines (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::point > &points) -> void
 Draws a series of line segments that connect an array of xtd::drawing::point structures.
auto draw_lines (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::point_f > &points) -> void
 Draws a series of line segments that connect an array of xtd::drawing::point_f structures.
auto draw_path (const xtd::drawing::pen &pen, const xtd::drawing::drawing_2d::graphics_path &path) -> void
 Draws a xtd::drawing::drawing_2d::graphics_path.
auto draw_pie (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle) -> void
 Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines.
auto draw_pie (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle) -> void
 Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines.
auto draw_pie (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::int32 start_angle, xtd::int32 sweep_angle) -> void
 Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
auto draw_pie (const xtd::drawing::pen &pen, float x, float y, float width, float height, float start_angle, float sweep_angle) -> void
 Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
auto draw_polygon (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::point > &points) -> void
 Draws a polygon defined by an array of xtd::drawing::point structures.
auto draw_polygon (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::point_f > &points) -> void
 Draws a polygon defined by an array of xtd::drawing::point_f structures.
auto draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point &point) -> void
 Draws a point specified by the coordinate pairs.
auto draw_point (const xtd::drawing::pen &pen, const xtd::drawing::point_f &point) -> void
 Draws a point specified by the coordinate pairs.
auto draw_point (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y) -> void
 Draws a point specified by the coordinate pairs.
auto draw_point (const xtd::drawing::pen &pen, float x, float y) -> void
 Draws a point specified by the coordinate pairs.
auto draw_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect) -> void
 Draws a rectangle specified by a xtd::drawing::rectangle structure.
auto draw_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect) -> void
 Draws a rectangle specified by a xtd::drawing::rectangle_f structure.
auto draw_rectangle (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Draws a rectangle specified by a coordinate pair, a width, and a height.
auto draw_rectangle (const xtd::drawing::pen &pen, float x, float y, float width, float height) -> void
 Draws a rectangle specified by a coordinate pair, a width, and a height.
auto draw_rectangles (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::rectangle > &rects) -> void
 Draws a series of rectangles specified by xtd::drawing::rectangle structures.
auto draw_rectangles (const xtd::drawing::pen &pen, const xtd::array< xtd::drawing::rectangle_f > &rects) -> void
 Draws a series of rectangles specified by xtd::drawing::rectangle_f structures.
auto 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) -> void
 Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle.
auto draw_rotated_string (const xtd::string &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, float x, float y, float angle) -> void
 Draws the specified text string at the specified location with the specified xtd::drawing::brush, xtd::drawing::font objects and angle.
auto draw_rounded_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, xtd::int32 radius) -> void
 Draws a rounded rectangle specified by a xtd::drawing::rectangle structure, and radius.
auto draw_rounded_rectangle (const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float radius) -> void
 Draws a rounded rectangle specified by a xtd::drawing::rectangle_f structure, and radius.
auto draw_rounded_rectangle (const xtd::drawing::pen &pen, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::int32 radius) -> void
 Draws a rounded rectangle specified by a coordinate pair, a width, and a height, and radius.
auto draw_rounded_rectangle (const xtd::drawing::pen &pen, float x, float y, float width, float height, float radius) -> void
 Draws a rounded rectangle specified by a coordinate pair, a width, a height, and radius.
auto draw_string (const xtd::string &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &layout_rectangle) -> void
 Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects.
auto 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) -> void
 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.
auto draw_string (const xtd::string &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, const xtd::drawing::point_f &point) -> void
 Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects.
auto 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) -> void
 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.
auto draw_string (const xtd::string &s, const xtd::drawing::font &font, const xtd::drawing::brush &brush, float x, float y) -> void
 Draws the specified text string at the specified location with the specified xtd::drawing::brush and xtd::drawing::font objects.
auto 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) -> void
 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.
auto exclude_clip (const xtd::drawing::region &region) -> void
 Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::region.
auto exclude_clip (const xtd::drawing::rectangle &rect) -> void
 Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle.
auto exclude_clip (const xtd::drawing::rectangle_f &rect) -> void
 Updates the clip region of this xtd::drawing::graphics to exclude the area specified by a xtd::drawing::rectangle_f.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point > &points) -> void
 Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point_f > &points) -> void
 Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point > &points, xtd::drawing::drawing_2d::fill_mode fill_mode) -> void
 Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point structures using the specified fill mode.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::fill_mode fill_mode) -> void
 Fills the interior of a closed cardinal spline curve defined by an array of xtd::drawing::point_f structures using the specified fill mode.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point > &points, xtd::drawing::drawing_2d::fill_mode fill_mode, float tension) -> void
 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.
auto fill_closed_curve (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::fill_mode fill_mode, float tension) -> void
 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.
auto fill_ellipse (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect) -> void
 Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle structure.
auto fill_ellipse (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect) -> void
 Fills the interior of an ellipse defined by a bounding rectangle specified by a xtd::drawing::rectangle_f structure.
auto fill_ellipse (const xtd::drawing::brush &brush, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
auto fill_ellipse (const xtd::drawing::brush &brush, float x, float y, float width, float height) -> void
 Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
auto fill_path (const xtd::drawing::brush &brush, const xtd::drawing::drawing_2d::graphics_path &path) -> void
 Fills the interior of a xtd::drawing::drawing_2d::graphics_path.
auto fill_pie (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle) -> void
 Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle structure and two radial lines.
auto fill_pie (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle) -> void
 Fills the interior of a pie section defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines.
auto fill_pie (const xtd::drawing::brush &brush, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::int32 start_angle, xtd::int32 sweep_angle) -> void
 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.
auto fill_pie (const xtd::drawing::brush &brush, float x, float y, float width, float height, float start_angle, float sweep_angle) -> void
 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.
auto fill_polygon (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point > &points) -> void
 Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures.
auto fill_polygon (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point_f > &points) -> void
 Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures.
auto fill_polygon (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point > &points, xtd::drawing::drawing_2d::fill_mode fill_mode) -> void
 Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point structures using the specified fill mode.
auto fill_polygon (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::point_f > &points, xtd::drawing::drawing_2d::fill_mode fill_mode) -> void
 Fills the interior of a polygon defined by an array of points specified by xtd::drawing::point_f structures using the specified fill mode.
auto fill_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect) -> void
 Fills the interior of a rectangle specified by a xtd::drawing::rectangle structure.
auto fill_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect) -> void
 Fills the interior of a rectangle specified by a xtd::drawing::rectangle_f structure.
auto fill_rectangle (const xtd::drawing::brush &brush, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> void
 Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
auto fill_rectangle (const xtd::drawing::brush &brush, float x, float y, float width, float height) -> void
 Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
auto fill_rectangles (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::rectangle > &rects) -> void
 Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle structures.
auto fill_rectangles (const xtd::drawing::brush &brush, const xtd::array< xtd::drawing::rectangle_f > &rects) -> void
 Fills the interiors of a series of rectangles specified by xtd::drawing::rectangle_f structures.
auto fill_region (const xtd::drawing::brush &brush, const xtd::drawing::region &region) -> void
 Fills the interior of a xtd::drawing::region.
auto fill_rounded_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle &rect, xtd::int32 radius) -> void
 Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle structure.
auto fill_rounded_rectangle (const xtd::drawing::brush &brush, const xtd::drawing::rectangle_f &rect, float radius) -> void
 Fills the interior of a rounded rectangle specified by a xtd::drawing::rectangle_f structure.
auto fill_rounded_rectangle (const xtd::drawing::brush &brush, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::int32 radius) -> void
 Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius.
auto fill_rounded_rectangle (const xtd::drawing::brush &brush, float x, float y, float width, float height, float radius) -> void
 Fills the interior of a rounded rectangle specified by a pair of coordinates, a width, a height, and a radius.
auto flush () -> void
 Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.
auto flush (xtd::drawing::drawing_2d::flush_intention intention) -> void
 Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish.
auto get_hdc () const -> xtd::intptr
 Gets the handle to the device context associated with this xtd::drawing::graphics.
auto get_nearest_color (const xtd::drawing::color &color) const -> xtd::drawing::color
 Gets the nearest color to the specified xtd::drawing::color structure.
auto intersect_clip (const xtd::drawing::region &region) -> void
 Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::region.
auto intersect_clip (const xtd::drawing::rectangle &rect) -> void
 Updates the clip region of this xtd::drawing::graphics to the intersection of the current clip region and the specified xtd::drawing::rectangle structure.
auto intersect_clip (const xtd::drawing::rectangle_f &rect) -> void
 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.
auto is_visible (const xtd::drawing::rectangle &rect) -> bool
 Indicates whether the rectangle specified by a xtd::drawing::rectangle structure is contained within the visible clip region of this xtd::drawing::graphics.
auto is_visible (const xtd::drawing::rectangle_f &rect) -> bool
 Indicates whether the rectangle specified by a xtd::drawing::rectangle_f structure is contained within the visible clip region of this xtd::drawing::graphics.
auto is_visible (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) -> bool
 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.
auto is_visible (float x, float y, float width, float height) -> bool
 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.
auto is_visible (const xtd::drawing::point &point) -> bool
 ndicates whether the specified xtd::drawing::point structure is contained within the visible clip region of this xtd::drawing::graphics.
auto is_visible (const xtd::drawing::point_f &point) -> bool
 ndicates whether the specified xtd::drawing::point_f structure is contained within the visible clip region of this xtd::drawing::graphics.
auto is_visible (xtd::int32 x, xtd::int32 y) -> bool
 Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics.
auto is_visible (float x, float y) -> bool
 Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this xtd::drawing::graphics.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font within the specified layout area.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, xtd::int32 width) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, const xtd::drawing::point_f &origin, const xtd::drawing::string_format &format) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area, const xtd::drawing::string_format &format) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, xtd::int32 width, const xtd::drawing::string_format &format) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.
auto measure_string (const xtd::string &text, const xtd::drawing::font &font, const xtd::drawing::size_f &layout_area, const xtd::drawing::string_format &format, xtd::usize characters_fitted, xtd::usize lines_filled) -> xtd::drawing::size_f
 Measures the specified string when drawn with the specified xtd::drawing::font and formatted with the specified xtd::drawing::string_format.
auto multiply_transform (const xtd::drawing::drawing_2d::matrix &matrix) -> void
 Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing_2d::matrix.
auto multiply_transform (const xtd::drawing::drawing_2d::matrix &matrix, xtd::drawing::drawing_2d::matrix_order order) -> void
 Multiplies the world transformation of this xtd::drawing::graphics and specified the xtd::drawing::drawing_2d::matrix with specified order.
auto release_hdc (xtd::intptr hdc) -> void
 Releases a device context handle obtained by a previous call to the xtd::drawing::graphics::get_hdc() method of this xtd::drawing::graphics.
auto reset_clip () -> void
 Resets the clip region of this xtd::drawing::graphics to an infinite region.
auto reset_transform () -> void
 Resets the world transformation matrix of this xtd::drawing::graphics to the identity matrix.
auto restore (const xtd::drawing::drawing_2d::graphics_state &gstate) -> void
 Restores the state of this xtd::drawing::graphics to the state represented by a xtd::drawing::drawing_2d::graphics_state.
auto rotate_transform (float angle) -> void
 Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics.
auto rotate_transform (float angle, xtd::drawing::drawing_2d::matrix_order order) -> void
 Applies the specified rotation to the transformation matrix of this xtd::drawing::graphics in the specified order.
auto save () -> xtd::drawing::drawing_2d::graphics_state
 Saves the current state of this xtd::drawing::graphics and identifies the saved state with a xtd::drawing::drawing_2d::graphics_state.
auto scale_transform (float sx, float sy) -> void
 Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics by prepending it to the object's transformation matrix.
auto scale_transform (float sx, float sy, xtd::drawing::drawing_2d::matrix_order order) -> void
 Applies the specified scaling operation to the transformation matrix of this xtd::drawing::graphics in the specified order.
auto translate_clip (xtd::int32 dx, xtd::int32 dy) -> void
 Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions.
auto translate_clip (float dx, float dy) -> void
 Translates the clipping region of this xtd::drawing::graphics by specified amounts in the horizontal and vertical directions.
auto translate_transform (float dx, float dy) -> void
 Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this xtd::drawing::graphics.
auto translate_transform (float dx, float dy, xtd::drawing::drawing_2d::matrix_order order) -> void
 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.
auto trim_string (const xtd::string &text, const xtd::drawing::font &font, float width, xtd::drawing::string_trimming trimming) -> xtd::string
 Trims the specified string for a specified width with the specified xtd::drawing::font and with the specified xtd::drawing::string_trimming.
auto to_string () const noexcept -> xtd::string override
 Returns a xtd::string that represents the current object.

Public Static Methods

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

Additional Inherited Members

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

Member Function Documentation

◆ clip() [1/2]

auto xtd::drawing::graphics::clip ( ) const -> xtd::drawing::region
nodiscardnoexcept

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]

auto xtd::drawing::graphics::clip ( const xtd::drawing::region value) -> graphics &

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

auto xtd::drawing::graphics::clip_bounds ( ) const -> xtd::drawing::rectangle_f
nodiscardnoexcept

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]

auto xtd::drawing::graphics::compositing_mode ( ) const -> xtd::drawing::drawing_2d::compositing_mode
nodiscardnoexcept

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]

auto xtd::drawing::graphics::compositing_mode ( xtd::drawing::drawing_2d::compositing_mode value) -> graphics &

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]

auto xtd::drawing::graphics::compositing_quality ( ) const -> xtd::drawing::drawing_2d::compositing_quality
nodiscardnoexcept

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]

auto xtd::drawing::graphics::compositing_quality ( xtd::drawing::drawing_2d::compositing_quality value) -> graphics &

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

auto xtd::drawing::graphics::dpi_x ( ) const -> float
nodiscardnoexcept

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

auto xtd::drawing::graphics::dpi_y ( ) const -> float
nodiscardnoexcept

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

auto xtd::drawing::graphics::handle ( ) const -> xtd::intptr
nodiscardnoexcept

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

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

◆ interpolation_mode() [1/2]

auto xtd::drawing::graphics::interpolation_mode ( ) const -> xtd::drawing::drawing_2d::interpolation_mode
nodiscardnoexcept

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]

auto xtd::drawing::graphics::interpolation_mode ( xtd::drawing::drawing_2d::interpolation_mode value) -> graphics &
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]

auto xtd::drawing::graphics::page_scale ( ) const -> float
nodiscardnoexcept

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]

auto xtd::drawing::graphics::page_scale ( float value) -> graphics &
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]

auto xtd::drawing::graphics::page_unit ( ) const -> xtd::drawing::graphics_unit
nodiscardnoexcept

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]

auto xtd::drawing::graphics::page_unit ( xtd::drawing::graphics_unit value) -> graphics &

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]

auto xtd::drawing::graphics::pixel_offset_mode ( ) const -> xtd::drawing::drawing_2d::pixel_offset_mode
nodiscardnoexcept

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]

auto xtd::drawing::graphics::pixel_offset_mode ( xtd::drawing::drawing_2d::pixel_offset_mode value) -> graphics &
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]

auto xtd::drawing::graphics::smoothing_mode ( ) const -> xtd::drawing::drawing_2d::smoothing_mode
nodiscardnoexcept

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]

auto xtd::drawing::graphics::smoothing_mode ( xtd::drawing::drawing_2d::smoothing_mode value) -> graphics &
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]

auto xtd::drawing::graphics::text_contrast ( ) const -> xtd::int32
nodiscardnoexcept

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]

auto xtd::drawing::graphics::text_contrast ( xtd::int32 value) -> graphics &
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]

auto xtd::drawing::graphics::text_rendering_hint ( ) const -> xtd::drawing::text::text_rendering_hint
nodiscardnoexcept

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]

auto xtd::drawing::graphics::text_rendering_hint ( xtd::drawing::text::text_rendering_hint value) -> graphics &

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]

auto xtd::drawing::graphics::transform ( ) const -> xtd::drawing::drawing_2d::matrix
nodiscardnoexcept

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]

auto xtd::drawing::graphics::transform ( const xtd::drawing::drawing_2d::matrix & value) -> graphics &
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()

auto xtd::drawing::graphics::visible_clip_bounds ( ) const -> xtd::drawing::rectangle_f
nodiscardnoexcept

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

auto xtd::drawing::graphics::clear ( const xtd::drawing::color & color) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto xtd::drawing::graphics::copy_from_graphics ( const graphics & source,
xtd::int32 source_x,
xtd::int32 source_y,
xtd::int32 destination_x,
xtd::int32 destination_y,
const xtd::drawing::size & block_region_size ) -> void

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]

auto xtd::drawing::graphics::copy_from_graphics ( const graphics & source,
xtd::int32 source_x,
xtd::int32 source_y,
xtd::int32 destination_x,
xtd::int32 destination_y,
const xtd::drawing::size & block_region_size,
xtd::drawing::copy_pixel_operation copy_pixel_operation ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto xtd::drawing::graphics::copy_from_screen ( xtd::int32 source_x,
xtd::int32 source_y,
xtd::int32 destination_x,
xtd::int32 destination_y,
const xtd::drawing::size & block_region_size ) -> void

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]

auto xtd::drawing::graphics::copy_from_screen ( xtd::int32 source_x,
xtd::int32 source_y,
xtd::int32 destination_x,
xtd::int32 destination_y,
const xtd::drawing::size & block_region_size,
xtd::drawing::copy_pixel_operation copy_pixel_operation ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & pen,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height,
xtd::int32 start_angle,
xtd::int32 sweep_angle ) -> void

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]

auto xtd::drawing::graphics::draw_arc ( const xtd::drawing::pen & pen,
float x,
float y,
float width,
float height,
float start_angle,
float sweep_angle ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_beziers ( const pen & pen,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::draw_beziers ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

auto xtd::drawing::graphics::draw_closed_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::draw_closed_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

auto xtd::drawing::graphics::draw_closed_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points,
float tension ) -> void

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]

auto xtd::drawing::graphics::draw_closed_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points,
float tension ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points,
float tension ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points,
float tension ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points,
xtd::usize offset,
xtd::usize number_of_segments ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points,
xtd::usize offset,
xtd::usize number_of_segments ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point > & points,
xtd::usize offset,
xtd::usize number_of_segments,
float tension ) -> void

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]

auto xtd::drawing::graphics::draw_curve ( const pen & pen,
const xtd::array< xtd::drawing::point_f > & points,
xtd::usize offset,
xtd::usize number_of_segments,
float tension ) -> void

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]

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

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
graphics.cpp.

◆ draw_ellipse() [2/4]

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

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]

auto xtd::drawing::graphics::draw_ellipse ( const xtd::drawing::pen & pen,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_icon ( const xtd::drawing::icon & icon,
xtd::int32 x,
xtd::int32 y ) -> void

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]

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

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

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

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]

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

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]

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

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]

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

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]

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

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image,
xtd::int32 x,
xtd::int32 y ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image,
const xtd::drawing::rectangle & dest_rect,
const xtd::drawing::rectangle & src_rect ) -> void

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]

auto xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image,
const xtd::drawing::rectangle_f & dest_rect,
const xtd::drawing::rectangle_f & src_rect ) -> void

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]

auto xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image,
const xtd::drawing::point & dest_point,
const xtd::drawing::rectangle & src_rect ) -> void

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]

auto xtd::drawing::graphics::draw_image ( const xtd::drawing::image & image,
const xtd::drawing::point_f & dest_point,
const xtd::drawing::rectangle_f & src_rect ) -> void

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]

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

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]

auto 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 ) -> void

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]

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

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]

auto 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 ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image,
xtd::int32 x,
xtd::int32 y ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_image_unscaled ( const xtd::drawing::image & image,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> void

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

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

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]

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

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.

◆ draw_line() [2/4]

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

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]

auto xtd::drawing::graphics::draw_line ( const xtd::drawing::pen & pen,
xtd::int32 x1,
xtd::int32 y1,
xtd::int32 x2,
xtd::int32 y2 ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_lines ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::draw_lines ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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

auto xtd::drawing::graphics::draw_path ( const xtd::drawing::pen & pen,
const xtd::drawing::drawing_2d::graphics_path & path ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & pen,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height,
xtd::int32 start_angle,
xtd::int32 sweep_angle ) -> void

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]

auto xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen & pen,
float x,
float y,
float width,
float height,
float start_angle,
float sweep_angle ) -> void

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]

auto xtd::drawing::graphics::draw_polygon ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::draw_polygon ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_point ( const xtd::drawing::pen & pen,
xtd::int32 x,
xtd::int32 y ) -> void

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]

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

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_rectangle ( const xtd::drawing::pen & pen,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> void

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]

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

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]

auto xtd::drawing::graphics::draw_rectangles ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::rectangle > & rects ) -> void

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]

auto xtd::drawing::graphics::draw_rectangles ( const xtd::drawing::pen & pen,
const xtd::array< xtd::drawing::rectangle_f > & rects ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & pen,
const xtd::drawing::rectangle & rect,
xtd::int32 radius ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::draw_rounded_rectangle ( const xtd::drawing::pen & pen,
float x,
float y,
float width,
float height,
float radius ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto 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 ) -> void

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]

auto xtd::drawing::graphics::draw_string ( const xtd::string & s,
const xtd::drawing::font & font,
const xtd::drawing::brush & brush,
float x,
float y ) -> void

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]

auto 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 ) -> void

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]

auto xtd::drawing::graphics::exclude_clip ( const xtd::drawing::region & region) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode ) -> void

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point_f > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode ) -> void

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode,
float tension ) -> void

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]

auto xtd::drawing::graphics::fill_closed_curve ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point_f > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode,
float tension ) -> void

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]

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

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
graphics.cpp.

◆ fill_ellipse() [2/4]

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

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]

auto xtd::drawing::graphics::fill_ellipse ( const xtd::drawing::brush & brush,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> void

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]

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

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

auto xtd::drawing::graphics::fill_path ( const xtd::drawing::brush & brush,
const xtd::drawing::drawing_2d::graphics_path & path ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & brush,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height,
xtd::int32 start_angle,
xtd::int32 sweep_angle ) -> void

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]

auto xtd::drawing::graphics::fill_pie ( const xtd::drawing::brush & brush,
float x,
float y,
float width,
float height,
float start_angle,
float sweep_angle ) -> void

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]

auto xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point > & points ) -> void

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]

auto xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point_f > & points ) -> void

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]

auto xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode ) -> void

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]

auto xtd::drawing::graphics::fill_polygon ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::point_f > & points,
xtd::drawing::drawing_2d::fill_mode fill_mode ) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & brush,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> void

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]

auto xtd::drawing::graphics::fill_rectangle ( const xtd::drawing::brush & brush,
float x,
float y,
float width,
float height ) -> void

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]

auto xtd::drawing::graphics::fill_rectangles ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::rectangle > & rects ) -> void

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]

auto xtd::drawing::graphics::fill_rectangles ( const xtd::drawing::brush & brush,
const xtd::array< xtd::drawing::rectangle_f > & rects ) -> void

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

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

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]

auto xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush,
const xtd::drawing::rectangle & rect,
xtd::int32 radius ) -> void

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]

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

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]

auto xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush,
xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height,
xtd::int32 radius ) -> void

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]

auto xtd::drawing::graphics::fill_rounded_rectangle ( const xtd::drawing::brush & brush,
float x,
float y,
float width,
float height,
float radius ) -> void

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]

auto xtd::drawing::graphics::flush ( ) -> void

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]

auto xtd::drawing::graphics::flush ( xtd::drawing::drawing_2d::flush_intention intention) -> void

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

auto xtd::drawing::graphics::get_hdc ( ) const -> xtd::intptr
nodiscard

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

auto xtd::drawing::graphics::get_nearest_color ( const xtd::drawing::color & color) const -> xtd::drawing::color
nodiscard

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]

auto xtd::drawing::graphics::intersect_clip ( const xtd::drawing::region & region) -> void

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]

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

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]

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

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]

auto xtd::drawing::graphics::is_visible ( const xtd::drawing::rectangle & rect) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( const xtd::drawing::rectangle_f & rect) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( float x,
float y,
float width,
float height ) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( const xtd::drawing::point & point) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( const xtd::drawing::point_f & point) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( xtd::int32 x,
xtd::int32 y ) -> bool
nodiscard

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]

auto xtd::drawing::graphics::is_visible ( float x,
float y ) -> bool
nodiscard

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]

auto xtd::drawing::graphics::measure_string ( const xtd::string & text,
const xtd::drawing::font & font ) -> xtd::drawing::size_f
nodiscard

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]

auto xtd::drawing::graphics::measure_string ( const xtd::string & text,
const xtd::drawing::font & font,
const xtd::drawing::size_f & layout_area ) -> xtd::drawing::size_f
nodiscard

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]

auto xtd::drawing::graphics::measure_string ( const xtd::string & text,
const xtd::drawing::font & font,
xtd::int32 width ) -> xtd::drawing::size_f
nodiscard

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]

auto 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 ) -> xtd::drawing::size_f
nodiscard

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]

auto 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 ) -> xtd::drawing::size_f
nodiscard

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]

auto xtd::drawing::graphics::measure_string ( const xtd::string & text,
const xtd::drawing::font & font,
xtd::int32 width,
const xtd::drawing::string_format & format ) -> xtd::drawing::size_f
nodiscard

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]

auto 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,
xtd::usize characters_fitted,
xtd::usize lines_filled ) -> xtd::drawing::size_f
nodiscard

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]

auto xtd::drawing::graphics::multiply_transform ( const xtd::drawing::drawing_2d::matrix & matrix) -> void

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]

auto xtd::drawing::graphics::multiply_transform ( const xtd::drawing::drawing_2d::matrix & matrix,
xtd::drawing::drawing_2d::matrix_order order ) -> void

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

auto xtd::drawing::graphics::release_hdc ( xtd::intptr hdc) -> void

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

auto xtd::drawing::graphics::reset_clip ( ) -> void

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

auto xtd::drawing::graphics::reset_transform ( ) -> void

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

auto xtd::drawing::graphics::restore ( const xtd::drawing::drawing_2d::graphics_state & gstate) -> void

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]

auto xtd::drawing::graphics::rotate_transform ( float angle) -> void

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]

auto xtd::drawing::graphics::rotate_transform ( float angle,
xtd::drawing::drawing_2d::matrix_order order ) -> void

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

auto xtd::drawing::graphics::save ( ) -> xtd::drawing::drawing_2d::graphics_state
nodiscard

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]

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

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]

auto xtd::drawing::graphics::scale_transform ( float sx,
float sy,
xtd::drawing::drawing_2d::matrix_order order ) -> void

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]

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

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]

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

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]

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

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]

auto xtd::drawing::graphics::translate_transform ( float dx,
float dy,
xtd::drawing::drawing_2d::matrix_order order ) -> void

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

auto xtd::drawing::graphics::trim_string ( const xtd::string & text,
const xtd::drawing::font & font,
float width,
xtd::drawing::string_trimming trimming ) -> xtd::string
nodiscard

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

auto xtd::drawing::graphics::to_string ( ) const -> xtd::string
inlinenodiscardoverridevirtualnoexcept

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>
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
object()=default
Create a new instance of the ultimate base class object.

Reimplemented from xtd::object.

◆ from_hdc() [1/2]

auto xtd::drawing::graphics::from_hdc ( xtd::intptr hdc) -> graphics
staticnodiscard

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]

auto xtd::drawing::graphics::from_hdc ( xtd::intptr hdc,
xtd::intptr hdevice ) -> graphics
staticnodiscard

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

auto xtd::drawing::graphics::from_hwnd ( xtd::intptr hwnd) -> graphics
staticnodiscard

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

auto xtd::drawing::graphics::from_image ( const xtd::drawing::image & image) -> graphics
staticnodiscard

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.
Examples
graphics.cpp, and hello_world_png.cpp.

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