10#include "../drawing_export.h"
29 class paint_event_args;
58 intptr_t
handle()
const {
return data_->handle_;}
95 void draw_arc(
const xtd::drawing::pen&
pen,
float x,
float y,
float width,
float height,
float start_angle,
float sweep_angle) {
draw_arc(
pen,
static_cast<int32_t
>(
x),
static_cast<int32_t
>(
y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height),
static_cast<int32_t
>(start_angle),
static_cast<int32_t
>(sweep_angle));}
104 void draw_bezier(
const xtd::drawing::pen&
pen,
const xtd::drawing::point& pt1,
const xtd::drawing::point& pt2,
const xtd::drawing::point& pt3,
const xtd::drawing::point& pt4) {
draw_bezier(
pen, pt1.
x(), pt1.
y(), pt2.
x(), pt2.
y(), pt3.
x(), pt3.
y(), pt4.
x(), pt4.
y());}
112 void draw_bezier(
const xtd::drawing::pen&
pen,
const xtd::drawing::point_f& pt1,
const xtd::drawing::point_f& pt2,
const xtd::drawing::point_f& pt3,
const xtd::drawing::point_f& pt4) {
draw_bezier(
pen, pt1.x(), pt1.y(), pt2.x(), pt2.y(), pt3.x(), pt3.y(), pt4.x(), pt4.y());}
124 void draw_bezier(
const pen&
pen,
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4) {
draw_bezier(
pen,
static_cast<int32_t
>(x1),
static_cast<int32_t
>(y1),
static_cast<int32_t
>(x2),
static_cast<int32_t
>(y2),
static_cast<int32_t
>(x3),
static_cast<int32_t
>(y3),
static_cast<int32_t
>(x4),
static_cast<int32_t
>(y4));}
136 void draw_bezier(
const pen&
pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, int32_t x4, int32_t y4);
169 void draw_image(
const xtd::drawing::image& image, int32_t x, int32_t y, int32_t width, int32_t height);
170 void draw_image(
const xtd::drawing::image& image,
float x,
float y,
float width,
float height) {draw_image(image,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height));}
172 void draw_image(
const xtd::drawing::image& image,
float x,
float y) {draw_image(image,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y));}
177 void draw_line(
const xtd::drawing::pen& pen,
float x1,
float y1,
float x2,
float y2) {
draw_line(pen,
static_cast<int32_t
>(x1),
static_cast<int32_t
>(y1),
static_cast<int32_t
>(x2),
static_cast<int32_t
>(y2));}
181 void draw_point(
const xtd::drawing::pen& pen, int32_t x, int32_t y) {draw_point(pen,
static_cast<float>(x),
static_cast<float>(y));}
182 void draw_point(
const xtd::drawing::pen& pen,
float x,
float y) {fill_ellipse(solid_brush(pen.color()), x, y, pen.width(), pen.width());}
186 void draw_rectangle(
const xtd::drawing::pen& pen, int32_t x, int32_t y, int32_t width, int32_t height);
187 void draw_rectangle(
const xtd::drawing::pen& pen,
float x,
float y,
float width,
float height) {draw_rectangle(pen,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height));}
189 void draw_rounded_rectangle(
const xtd::drawing::pen& pen,
const xtd::drawing::rectangle& rect, int32_t radius) {draw_rounded_rectangle(pen, rect.x(), rect.y(), rect.width(), rect.height(), radius);}
191 void draw_rounded_rectangle(
const xtd::drawing::pen& pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius);
192 void draw_rounded_rectangle(
const xtd::drawing::pen& pen,
float x,
float y,
float width,
float height,
float radius) {draw_rounded_rectangle(pen,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height),
static_cast<int32_t
>(radius));}
203 void fill_ellipse(
const xtd::drawing::brush& brush, int32_t x, int32_t y, int32_t width, int32_t height);
204 void fill_ellipse(
const xtd::drawing::brush& brush,
float x,
float y,
float width,
float height) {fill_ellipse(brush,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height));}
206 void fill_pie(
const xtd::drawing::brush& brush,
const xtd::drawing::rectangle& rect,
float start_angle,
float sweep_angle) {fill_pie(brush, rect.x(), rect.y(), rect.width(), rect.height(),
static_cast<int32_t
>(start_angle),
static_cast<int32_t
>(sweep_angle));}
207 void fill_pie(
const xtd::drawing::brush& brush,
const xtd::drawing::rectangle_f& rect,
float start_angle,
float sweep_angle) {fill_pie(brush, rect.x(), rect.y(), rect.width(), rect.height(), start_angle, sweep_angle);}
208 void fill_pie(
const xtd::drawing::brush& brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle);
209 void fill_pie(
const xtd::drawing::brush& brush,
float x,
float y,
float width,
float height,
float start_angle,
float sweep_angle) {fill_pie(brush,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height),
static_cast<int32_t
>(start_angle),
static_cast<int32_t
>(sweep_angle));}
213 void fill_rectangle(
const xtd::drawing::brush& brush, int32_t x, int32_t y, int32_t width, int32_t height);
214 void fill_rectangle(
const xtd::drawing::brush& brush,
float x,
float y,
float width,
float height) {fill_rectangle(brush,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height));}
218 void fill_rounded_rectangle(
const xtd::drawing::brush& brush, int32_t x, int32_t y, int32_t width, int32_t height, int32_t radius);
219 void fill_rounded_rectangle(
const xtd::drawing::brush& brush,
float x,
float y,
float width,
float height,
float radius) {fill_rounded_rectangle(brush,
static_cast<int32_t
>(x),
static_cast<int32_t
>(y),
static_cast<int32_t
>(width),
static_cast<int32_t
>(height),
static_cast<int32_t
>(radius));}
225 void rotate_transform(
float angle);
227 void translate_clip(int32_t dx, int32_t dy);
229 void translate_clip(
float dx,
float dy) {translate_clip(
static_cast<int32_t
>(dx),
static_cast<int32_t
>(dy));}
246 graphics(intptr_t handle) {data_->handle_ = handle;}
247 void draw_image_disabled(
const xtd::drawing::image& image, int32_t x, int32_t y,
float brightness);
250 intptr_t handle_ = 0;
252 std::shared_ptr<data> data_ = std::make_shared<data>();
Contains xtd::drawing::brush class.
Defines objects used to fill the interiors of graphical shapes such as rectangles,...
Definition: brush.h:27
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
Defines a particular format for text, including font face, size, and style attributes....
Definition: font.h:39
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:48
void draw_ellipse(const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height)
Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner o...
void draw_arc(const xtd::drawing::pen &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t start_angle, int32_t sweep_angle)
Draws an arc representing a portion of an ellipse specified by a pair of coordinates,...
void draw_bezier(const pen &pen, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, int32_t x4, int32_t y4)
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
void clear(const color &color)
Clears the entire drawing surface and fills it with the specified background color.
void draw_arc(const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect, float start_angle, float sweep_angle)
Draws an arc representing a portion of an ellipse specified by a Rectangle structure.
Definition: graphics.h:77
xtd::ustring to_string() const noexcept override
Returns a std::string that represents the current object.
Definition: graphics.h:231
void draw_arc(const xtd::drawing::pen &pen, float x, float y, float width, float height, float start_angle, float sweep_angle)
Draws an arc representing a portion of an ellipse specified by a pair of coordinates,...
Definition: graphics.h:95
void draw_ellipse(const xtd::drawing::pen &pen, const xtd::drawing::rectangle_f &rect)
Draws an ellipse specified by a bounding xtd::drawing::rectangle_f structure.
Definition: graphics.h:147
void draw_ellipse(const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect)
Draws an ellipse specified by a bounding xtd::drawing::rectangle structure.
Definition: graphics.h:142
intptr_t handle() const
Gets the handle device context that the graphics is bound to.
Definition: graphics.h:58
void draw_arc(const xtd::drawing::pen &pen, const xtd::drawing::rectangle &rect, float start_angle, float sweep_angle)
Draws an arc representing a portion of an ellipse specified by a Rectangle structure.
Definition: graphics.h:70
void draw_bezier(const xtd::drawing::pen &pen, const xtd::drawing::point &pt1, const xtd::drawing::point &pt2, const xtd::drawing::point &pt3, const xtd::drawing::point &pt4)
Draws a Bézier spline defined by four Point structures.
Definition: graphics.h:104
void draw_bezier(const pen &pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
Definition: graphics.h:124
void draw_bezier(const xtd::drawing::pen &pen, const xtd::drawing::point_f &pt1, const xtd::drawing::point_f &pt2, const xtd::drawing::point_f &pt3, const xtd::drawing::point_f &pt4)
Draws a Bézier spline defined by four Point structures.
Definition: graphics.h:112
void draw_ellipse(const xtd::drawing::pen &pen, float x, float y, float width, float height)
Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner o...
Definition: graphics.h:163
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition: image.h:34
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: pen.h:29
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimen...
Definition: point_f.h:26
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:48
int32_t y() const
Gets the y-coordinate of this point.
Definition: point.h:205
int32_t x() const
Gets the x-coordinate of this point.
Definition: point.h:159
Stores a set of four floating-points that represent the location and size of a rectangle.
Definition: rectangle_f.h:28
Stores a set of four integers that represent the location and size of a rectangle.
Definition: rectangle.h:25
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::drawing::color class.
Contains xtd::drawing::font class.
#define drawing_export_
Define shared library export.
Definition: drawing_export.h:13
@ control
The left or right CTRL modifier key.
@ point
Specifies a printer's point (1/72 inch) as the unit of measure.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::object class.
Contains xtd::drawing::pen class.
Contains xtd::drawing::point class.
Contains xtd::drawing::point_f class.
Contains xtd::drawing::rectangle class.
Contains xtd::drawing::rectangle_f class.
Contains xtd::drawing::size class.
Contains xtd::drawing::size_f class.
Contains xtd::drawing::solid_brush class.
Contains xtd::ustring class.