xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
brush.h
Go to the documentation of this file.
1
4#pragma once
5#include <cstdint>
6#include <memory>
7#include <ostream>
8#include <xtd/object.h>
9#include <xtd/ustring.h>
10#include "../drawing_export.h"
11
13namespace xtd {
15 namespace drawing {
17 class graphics;
19
27 class drawing_export_ brush : public object {
28 public:
29 //static const brush null;
30
32 brush(const brush& value);
33 brush& operator=(const brush& value);
34 ~brush();
35 bool operator==(const brush& value) const {return data_->handle_ == value.data_->handle_;}
36 bool operator!=(const brush& value) const {return !operator==(value);}
38
41 xtd::ustring to_string() const noexcept override {return ustring::full_class_name(*this);}
42
44 friend std::ostream& operator<<(std::ostream& os, const xtd::drawing::brush& brush) noexcept {
45 return os << brush.to_string();
46 }
48
49 protected:
50 friend class graphics;
51
54
57 void set_native_brush(intptr_t brush);
58
60 struct data {
61 intptr_t handle_ = 0;
62 };
63
64 std::shared_ptr<data> data_ = std::make_shared<data>();
66 };
67 }
68}
Defines objects used to fill the interiors of graphical shapes such as rectangles,...
Definition: brush.h:27
xtd::ustring to_string() const noexcept override
Converts this brush object to a human-readable string.
Definition: brush.h:41
void set_native_brush(intptr_t brush)
In a derived class, sets a reference to a GDI+ brush object.
brush()
Initialize a new instance of brush class.
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
#define drawing_export_
Define shared library export.
Definition: drawing_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::object class.
Contains xtd::ustring class.