xtd 0.2.0
linear_gradient_brush.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "../brush.hpp"
7#include "../color.hpp"
8#include "../point.hpp"
9#include "../rectangle.hpp"
12#include <xtd/array>
13
15namespace xtd {
17 namespace drawing {
19 namespace drawing_2d {
31 struct data;
32
33 public:
35
133
136 linear_gradient_brush& operator =(const linear_gradient_brush& value);
138
140
144 float angle() const noexcept;
148 linear_gradient_brush& angle(float value) noexcept;
149
157
160 const xtd::drawing::rectangle_f& rectangle() const noexcept;
170
171 private:
172 static float linear_gradient_mode_to_angle(xtd::drawing::drawing_2d::linear_gradient_mode);
173 void recreate_handle();
174
175 xtd::sptr<data> data_;
176 };
177 }
178
181 namespace [[deprecated("Replaced by xtd::drawing::drawing_2d - Will be removed in version 0.4.0.")]] drawing2d {
184 using linear_gradient_brush [[deprecated("Replaced by xtd::drawing::drawing_2d::linear_gradient_brush - Will be removed in version 0.4.0.")]] = xtd::drawing::drawing_2d::linear_gradient_brush;
185 }
186 }
187}
188
Contains xtd::drawing::brush class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
brush()
Initialize a new instance of brush class.
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
linear_gradient_brush()
Initializes a new instance of the xtd::drawing::drawing_2d::radial_gradient_brush class with default ...
Encapsulates a xtd::drawing::brush with a linear gradient. This class cannot be inherited.
Definition linear_gradient_brush.hpp:30
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::array< xtd::drawing::color > &linear_colors, xtd::drawing::drawing_2d::linear_gradient_mode linear_gradient_mode)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::point &point1, const xtd::drawing::point &point2, const xtd::array< xtd::drawing::color > &linear_colors)
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::array< xtd::drawing::color > &linear_colors)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors...
linear_gradient_brush(const xtd::drawing::point &point1, const xtd::drawing::point &point2, const xtd::drawing::color &color1, const xtd::drawing::color &color2)
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, xtd::drawing::drawing_2d::linear_gradient_mode linear_gradient_mode)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::array< xtd::drawing::color > &linear_colors, float angle)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors...
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::array< xtd::drawing::color > &linear_colors)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors...
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors...
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, xtd::drawing::drawing_2d::linear_gradient_mode linear_gradient_mode)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::point_f &point1, const xtd::drawing::point_f &point2, const xtd::drawing::color &color1, const xtd::drawing::color &color2)
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
const xtd::drawing::drawing_2d::gradient_stop_collection & linear_colors() const noexcept
Gets the starting and ending colors of the gradient.
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::array< xtd::drawing::color > &linear_colors, xtd::drawing::drawing_2d::linear_gradient_mode linear_gradient_mode)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
float angle() const noexcept
Gets the angle of the gradient.
const xtd::drawing::rectangle_f & rectangle() const noexcept
Gets a rectangular region that defines the starting and ending points of the linear gradient.
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::array< xtd::drawing::color > &linear_colors, float angle)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::rectangle &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, float angle)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush(const xtd::drawing::rectangle_f &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, float angle)
Initializes a new instance of the linear_gradient_brush class with the specified rectangle,...
linear_gradient_brush()
Initializes a new instance of the xtd::drawing::drawing_2d::radial_gradient_brush class with default ...
linear_gradient_brush(const xtd::drawing::point_f &point1, const xtd::drawing::point_f &point2, const xtd::array< xtd::drawing::color > &linear_colors)
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
Contains xtd::drawing::color class.
Contains drawing_export_ keyword.
Contains xtd::drawing::drawing_2d::gradient_stop alias.
xtd::collections::generic::list< xtd::drawing::drawing_2d::gradient_stop > gradient_stop_collection
Represents a collection of xtd::drawing::drawing_2d::gradient_stop objects that can be individually a...
Definition gradient_stop_collection.hpp:20
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
linear_gradient_mode
Specifies the direction of a linear gradient.
Definition linear_gradient_mode.hpp:19
Contains xtd::drawing::drawing_2d::linear_gradient_mode enum class.
The xtd::drawing::drawing2d namespace provides advanced two-dimensional and vector graphics functiona...
Definition hatch_brush.hpp:81
The xtd::drawing::drawing_2d namespace provides advanced two-dimensional and vector graphics function...
Definition compositing_mode.hpp:12
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::drawing::point class.
Contains xtd::drawing::rectangle class.
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimen...
Definition point_f.hpp:35
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition point.hpp:54
Stores a set of four floating-point numbers that represent the location and size of a rectangle....
Definition rectangle_f.hpp:34
Stores a set of four integers that represent the location and size of a rectangle.
Definition rectangle.hpp:44