xtd 0.2.0
conical_gradient_brush.h
Go to the documentation of this file.
1 #pragma once
5 #include <array>
6 #include <utility>
7 #include <xtd/iequatable.h>
8 #include "../../drawing_export.h"
9 #include "../brush.h"
10 #include "../point.h"
11 #include "../rectangle.h"
13 
15 namespace xtd {
17  namespace drawing {
19  namespace drawing2d {
35  class drawing_export_ conical_gradient_brush final : public brush, public xtd::iequatable<conical_gradient_brush> {
36  struct data;
37 
38  public:
40 
54  conical_gradient_brush(const xtd::drawing::point_f& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2);
60  conical_gradient_brush(const xtd::drawing::point& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2, float angle);
66  conical_gradient_brush(const xtd::drawing::point_f& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2, float angle);
71  conical_gradient_brush(const xtd::drawing::point& center, const std::vector<xtd::drawing::color>& conical_colors);
76  conical_gradient_brush(const xtd::drawing::point_f& center, const std::vector<xtd::drawing::color>& conical_colors);
82  conical_gradient_brush(const xtd::drawing::point& center, const std::vector<xtd::drawing::color>& conical_colors, float angle);
88  conical_gradient_brush(const xtd::drawing::point_f& center, const std::vector<xtd::drawing::color>& conical_colors, float angle);
90 
93  conical_gradient_brush& operator =(const conical_gradient_brush& value);
95 
97 
102  float angle() const noexcept;
107  conical_gradient_brush& angle(float value) noexcept;
108 
111  xtd::drawing::point_f center_point() const noexcept;
115  conical_gradient_brush& center_point(const xtd::drawing::point_f& value) noexcept;
119  conical_gradient_brush& center_point(const xtd::drawing::point& value) noexcept;
120 
123  const xtd::drawing::drawing2d::gradient_stop_collection& conical_colors() const noexcept;
129 
131 
133  using brush::equals;
134  bool equals(const conical_gradient_brush& value) const noexcept override;
136 
137  private:
138  void recreate_handle();
139 
140  std::shared_ptr<data> data_;
141  };
142  }
143  }
144 }
145 
Encapsulates a xtd::drawing::brush with a conical gradient. This class cannot be inherited.
Definition: conical_gradient_brush.h:35
Contains xtd::iequatable interface.
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::vector< xtd::drawing::drawing2d::gradient_stop > gradient_stop_collection
Represents a collection of xtd::drawing::drawing2d::gradient_stop objects that can be individually ac...
Definition: gradient_stop_collection.h:20
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimen...
Definition: point_f.h:35
Specifies that the xtd::drawing::pen object is centered over the theoretical line.
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
Contains xtd::drawing::drawing2d::gradient_stop alias.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
Definition: brush.h:51