xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
solid_brush.h
Go to the documentation of this file.
1 #pragma once
5 #include "../drawing_export.h"
6 #include "brush.h"
7 #include "color.h"
8 
10 namespace xtd {
12  namespace drawing {
22  class drawing_export_ solid_brush final : public brush {
23  public:
25 
27  explicit solid_brush(const drawing::color& color) {this->color(color);}
29 
31  solid_brush(const solid_brush& value);
32  solid_brush& operator=(const solid_brush& value);
33  bool operator==(const solid_brush& value) const {return data_->color_ == value.data_->color_;}
34  bool operator!=(const solid_brush& value) const {return !operator==(value);}
36 
38 
40  const drawing::color& color() const {return data_->color_;}
41  solid_brush& color(const drawing::color& color);
43 
44  private:
45  solid_brush();
46  struct data {
47  drawing::color color_;
48  };
49  std::shared_ptr<data> data_ = std::make_shared<data>();
50  };
51  }
52 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::drawing::brush class.
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
Defines a xtd::drawing::brush of a single color. Brushes are used to fill graphics shapes...
Definition: solid_brush.h:22
Contains xtd::drawing::color class.
Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
Definition: brush.h:27