xtd - Reference Guide 0.2.0
brush.h
Go to the documentation of this file.
1 #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 
13 namespace xtd {
15  namespace drawing {
50  class drawing_export_ brush : public xtd::object {
51  public:
53  brush(const brush& value);
54  brush& operator =(const brush& value);
55  ~brush();
56  bool operator ==(const brush& value) const {return data_->handle_ == value.data_->handle_;}
57  bool operator !=(const brush& value) const {return !operator ==(value);}
59 
61 
65  intptr_t handle() const {return data_->handle_;}
67 
69 
73  xtd::ustring to_string() const noexcept override {return ustring::full_class_name(*this);}
75 
76  protected:
78 
81  brush();
83 
85 
89  void set_native_brush(intptr_t brush);
91 
92  private:
94  struct data {
95  intptr_t handle_ = 0;
96  };
97 
98  std::shared_ptr<data> data_ = std::make_shared<data>();
100  };
101  }
102 }
xtd::ustring to_string() const noexcept override
Converts this brush object to a human-readable string.
Definition: brush.h:73
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
intptr_t handle() const
Gets the handle of the brush.
Definition: brush.h:65
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:51
Contains xtd::ustring class.
Contains xtd::object class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:30
static ustring full_class_name()
Gets the fully qualified class name of the objec_t, including the namespace of the objec_t...
Definition: ustring.h:781
Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
Definition: brush.h:50