xtd 0.2.0
radial_gradient_brush.h
Go to the documentation of this file.
1 #pragma once
5 #include "../../drawing_export.h"
6 #include "../brush.h"
7 #include "../point.h"
8 #include "../rectangle.h"
10 #include "drawing2d.h"
11 #include <xtd/iequatable>
12 #include <array>
13 #include <utility>
14 
16 namespace xtd {
18  namespace drawing {
20  namespace drawing_2d {
31  class drawing_export_ radial_gradient_brush final : public brush, public xtd::iequatable<radial_gradient_brush> {
32  struct data;
33 
34  public:
36 
50  radial_gradient_brush(const xtd::drawing::point_f& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2);
56  radial_gradient_brush(const xtd::drawing::point& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2, float radius);
62  radial_gradient_brush(const xtd::drawing::point_f& center, const xtd::drawing::color& color1, const xtd::drawing::color& color2, float radius);
67  radial_gradient_brush(const xtd::drawing::point& center, const std::vector<xtd::drawing::color>& radial_colors);
72  radial_gradient_brush(const xtd::drawing::point_f& center, const std::vector<xtd::drawing::color>& radial_colors);
78  radial_gradient_brush(const xtd::drawing::point& center, const std::vector<xtd::drawing::color>& radial_colors, float radius);
84  radial_gradient_brush(const xtd::drawing::point_f& center, const std::vector<xtd::drawing::color>& radial_colors, float radius);
86 
89  radial_gradient_brush& operator =(const radial_gradient_brush& value);
91 
93 
97  xtd::drawing::point_f center_point() const noexcept;
101  radial_gradient_brush& center_point(const xtd::drawing::point_f& value) noexcept;
105  radial_gradient_brush& center_point(const xtd::drawing::point& value) noexcept;
106 
109  xtd::drawing::point_f focal_point() const noexcept;
113  radial_gradient_brush& focal_point(const xtd::drawing::point_f& value) noexcept;
117  radial_gradient_brush& focal_point(const xtd::drawing::point& value) noexcept;
118 
121  const xtd::drawing::drawing_2d::gradient_stop_collection& radial_colors() const noexcept;
126 
129  float radius() const noexcept;
133  radial_gradient_brush& radius(float value) noexcept;
135 
137 
139  using brush::equals;
140  bool equals(const radial_gradient_brush& value) const noexcept override;
142 
143  private:
144  void recreate_handle();
145 
146  std::shared_ptr<data> data_;
147  };
148  }
149  }
150 }
151 
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
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimen...
Definition: point_f.h:35
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
std::vector< xtd::drawing::drawing_2d::gradient_stop > gradient_stop_collection
Represents a collection of xtd::drawing::drawing_2d/gradient_stop objects that can be individually ac...
Definition: gradient_stop_collection.h:21
Contains xtd::drawing::drawing_2d/::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
Encapsulates a xtd::drawing::brush with a radial gradient. This class cannot be inherited.
Definition: radial_gradient_brush.h:31
Specifies that the xtd::drawing::pen object is centered over the theoretical line.
Contains xtd::drawing::drawing_2d/::matrix class.
Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
Definition: brush.h:33