xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
hatch_brush.h
Go to the documentation of this file.
1
4#pragma once
5#include <array>
6#include "../../drawing_export.h"
7#include "../brush.h"
8#include "../color.h"
9#include "../image.h"
10#include "../point.h"
11#include "../rectangle.h"
12#include "hatch_style.h"
13
15namespace xtd {
17 namespace drawing {
19 namespace drawing2d {
31 class drawing_export_ hatch_brush final : public brush {
32 public:
45
47 hatch_brush(const hatch_brush& value);
48 hatch_brush& operator=(const hatch_brush& value);
49 bool operator==(const hatch_brush& value) const {return data_->hatch_style_ == value.data_->hatch_style_ && data_->fore_color_ == value.data_->fore_color_ && data_->back_color_ == value.data_->back_color_;}
50 bool operator!=(const hatch_brush& value) const {return !operator==(value);}
52
55 xtd::drawing::color background_color() const {return data_->back_color_;}
56
59 xtd::drawing::color foreground_color() const {return data_->fore_color_;}
60
63 xtd::drawing::drawing2d::hatch_style hatch_style() const {return data_->hatch_style_;}
64
65 private:
66 void recreate_handle();
67 struct data {
69 xtd::drawing::color fore_color_;
70 xtd::drawing::color back_color_;
71 };
72 std::shared_ptr<data> data_ = std::make_shared<data>();
73 };
74 }
75 }
76}
Defines objects used to fill the interiors of graphical shapes such as rectangles,...
Definition brush.h:27
Represents an ARGB (alpha, red, green, blue) color.
Definition color.h:39
Defines a rectangular xtd::drawing::brush with a hatch style, a foreground color, and a background co...
Definition hatch_brush.h:31
xtd::drawing::color background_color() const
Gets the color of spaces between the hatch lines drawn by this hatch_brush object.
Definition hatch_brush.h:55
xtd::drawing::color foreground_color() const
Gets the color of hatch lines drawn by this hatch_brush object.
Definition hatch_brush.h:59
hatch_brush(xtd::drawing::drawing2d::hatch_style hatch_style, const xtd::drawing::color &fore_color)
Initializes a new instance of the xtd::drawing::drawing2d::hatch_brush class with the specified xtd::...
Definition hatch_brush.h:39
xtd::drawing::drawing2d::hatch_style hatch_style() const
Gets the hatch style of this hatch_brush object.
Definition hatch_brush.h:63
hatch_brush(xtd::drawing::drawing2d::hatch_style hatch_style, const xtd::drawing::color &fore_color, const xtd::drawing::color &back_color)
Initializes a new instance of the xtd::drawing::drawing2d::hatch_brush class with the specified xtd::...
hatch_brush()
Initializes a new instance of the hatch_brush class.
#define drawing_export_
Define shared library export.
Definition drawing_export.h:13
hatch_style
Specifies the different patterns available for xtd::drawing::drawing2d::hatch_brush objects.
Definition hatch_style.h:19
@ horizontal
A pattern of horizontal lines.
Contains xtd::drawing::drawing2d::hatch_style enum class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17
@ black
The color black.