xtd 0.2.0
buffered_graphics.h
Go to the documentation of this file.
1 #pragma once
5 #include "graphics.h"
6 #include <xtd/optional>
7 #include <xtd/object>
8 #include <xtd/types>
9 
10 
12 namespace xtd {
14  namespace drawing {
32  class drawing_export_ buffered_graphics : public xtd::object {
33  public:
35 
40  const xtd::drawing::graphics& graphics() const noexcept;
41  xtd::drawing::graphics& graphics() noexcept;
43 
45 
49  void render();
53  void render(xtd::drawing::graphics& target);
57  void render(intptr target_dc);
59 
60  protected:
61  buffered_graphics(const xtd::drawing::graphics& buffered_graphics_surface, std::optional<xtd::drawing::graphics> target_graphics, intptr target_dc, const xtd::drawing::point& target_location, xtd::drawing::size virtual_size);
62 
63  private:
64  xtd::drawing::graphics buffered_graphics_surface_;
65  intptr target_dc_ = 0;
66  std::optional<xtd::drawing::graphics> target_graphics_;
67  xtd::drawing::point target_location_;
68  xtd::drawing::size virtual_size_;
69  };
70  }
71 }
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Provides a graphics buffer for double buffering.
Definition: buffered_graphics.h:32
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:70
Contains xtd::drawing::graphics class.