xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.drawing
include
xtd
drawing
buffered_graphics_context.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
buffered_graphics.hpp
"
6
#include "
graphics.hpp
"
7
#include "
point.hpp
"
8
#include "
size.hpp
"
9
#include <xtd/optional>
10
#include <xtd/object>
11
#include <xtd/types>
12
14
namespace
xtd
{
16
namespace
drawing
{
32
class
drawing_export_
buffered_graphics_context
:
public
xtd::object
{
33
public
:
35
39
buffered_graphics_context
() =
default
;
41
43
48
[[nodiscard]]
auto
maximum_buffer
() const noexcept -> const
xtd
::
drawing
::
size
&;
53
auto
maximum_buffer
(const
xtd
::
drawing
::
size
& value) ->
buffered_graphics_context
&;
55
57
59
auto allocate(const
xtd
::
drawing
::
graphics
& target_graphics, const
xtd
::
drawing
::
rectangle
& targat_rectangle) ->
void
;
60
auto allocate(
intptr
target_dc, const
xtd
::
drawing
::
rectangle
& targat_rectangle) ->
void
;
61
64
void
invalidate
();
66
67
private:
68
//xtd::drawing::buffered_graphics alloc_buffer_in_temp_manager(const xtd::drawing::graphics* target_graphics, intptr target_dc, const xtd::drawing::rectangle& target_rectangle);
69
//xtd::drawing::buffered_graphics allocate_buffer(const xtd::drawing::graphics* target_graphics, intptr target_dc, const xtd::drawing::rectangle& target_rectangle);
70
auto destroy() ->
void
;
71
72
inline static const
int
BUFFER_FREE = 0;
//the graphics buffer is free to use
73
inline static const
int
BUFFER_BUSY_PAINTING = 1;
//graphics buffer is busy being created/painting
74
inline static const
int
BUFFER_BUSY_DESTROYING = 2;
//graphics buffer is busy destroying
75
76
xtd
::
ptr
<
xtd
::
drawing
::
buffered_graphics
> buffer_;
77
xtd
::
drawing
::
size
buffered_size_;
78
int
busy_ = BUFFER_FREE;
79
xtd
::
ptr
<
xtd
::
drawing
::
graphics
> compat_graphics_;
80
bool
invalidate_when_free_ = false;
81
xtd
::
drawing
::
size
maximum_buffer_ {75 * 3, 32 * 3};
//by defualt, the size of our maxbuffer will be 3 x standard button size.
82
xtd::drawing::point
target_location_;
83
xtd::drawing::size
virtual_size_;
84
};
85
}
86
}
buffered_graphics.hpp
Contains xtd::drawing::buffered_graphics class.
xtd::drawing::buffered_graphics_context::invalidate
void invalidate()
Destroy of the current graphics buffer, if a buffer has been allocated and has not yet been destroyed...
xtd::drawing::buffered_graphics_context::buffered_graphics_context
buffered_graphics_context()=default
Initializes a new instance of the BufferedGraphicsContext class.
xtd::drawing::buffered_graphics_context::maximum_buffer
auto maximum_buffer() const noexcept -> const xtd::drawing::size &
Gets the maximum size of the buffer to use.
xtd::drawing::buffered_graphics
Provides a graphics buffer for double buffering.
Definition
buffered_graphics.hpp:32
xtd::drawing::graphics
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition
graphics.hpp:67
xtd::object
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition
object.hpp:45
graphics.hpp
Contains xtd::drawing::graphics class.
drawing_export_
#define drawing_export_
Define shared library export.
Definition
drawing_export.hpp:13
xtd::intptr
std::intmax_t intptr
Represent a pointer or a handle.
Definition
intptr.hpp:23
xtd::ptr
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition
ptr.hpp:27
xtd::drawing
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition
actions_system_images.hpp:10
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
point.hpp
Contains xtd::drawing::point struct.
size.hpp
Contains xtd::drawing::size struct.
xtd::drawing::point
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition
point.hpp:54
xtd::drawing::rectangle
Stores a set of four integers that represent the location and size of a rectangle.
Definition
rectangle.hpp:44
xtd::drawing::size
Stores an ordered pair of integers, which specify a height and width.
Definition
size.hpp:32
Generated on
for xtd by
Gammasoft
. All rights reserved.