Encapsulates a xtd::drawing::brush with a linear gradient. This class cannot be inherited.
Public Constructors | |
linear_gradient_brush () | |
Initializes a new instance of the xtd::drawing::drawing_2d::radial_gradient_brush class with default values. | |
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::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. | |
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, colors, and orientation. | |
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, colors, and orientation angle. | |
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, colors, and orientation. | |
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, colors, and orientation angle. | |
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_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::point &point1, const xtd::drawing::point &point2, const std::vector< 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::point_f &point1, const xtd::drawing::point_f &point2, const std::vector< 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 &rect, const std::vector< 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, colors, and orientation. | |
linear_gradient_brush (const xtd::drawing::rectangle &rect, const std::vector< xtd::drawing::color > &linear_colors, float angle) | |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation angle. | |
linear_gradient_brush (const xtd::drawing::rectangle_f &rect, const std::vector< 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, colors, and orientation. | |
linear_gradient_brush (const xtd::drawing::rectangle_f &rect, const std::vector< xtd::drawing::color > &linear_colors, float angle) | |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation angle. | |
linear_gradient_brush (const xtd::drawing::rectangle &rect, const std::vector< 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_f &rect, const std::vector< xtd::drawing::color > &linear_colors) | |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors. | |
Public Properties | |
float | angle () const noexcept |
Gets the angle of the gradient. | |
linear_gradient_brush & | angle (float value) noexcept |
Sets the angle of the gradient. | |
const xtd::drawing::drawing_2d::gradient_stop_collection & | linear_colors () const noexcept |
Gets the starting and ending colors of the gradient. | |
xtd::drawing::drawing_2d::linear_gradient_brush & | linear_colors (const xtd::drawing::drawing_2d::gradient_stop_collection &value) |
sets the starting and ending colors 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 & | rectangle (const xtd::drawing::rectangle_f &value) noexcept |
Sets a rectangular region that defines the starting and ending points of the linear gradient. | |
linear_gradient_brush & | rectangle (const xtd::drawing::rectangle &value) noexcept |
Sets a rectangular region that defines the starting and ending points of the linear gradient. | |
Public Methods | |
bool | equals (const linear_gradient_brush &value) const noexcept override |
bool | equals (const brush &value) const noexcept override |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::drawing::brush | |
intptr | handle () const noexcept |
Gets the handle of the brush. | |
bool | equals (const brush &value) const noexcept override |
xtd::string | to_string () const noexcept override |
Converts this brush object to a human-readable string. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::iequatable< brush > | |
virtual bool | equals (const brush &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Static Public Member Functions inherited from xtd::drawing::brush | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
Protected Member Functions inherited from xtd::drawing::brush | |
brush () | |
Initialize a new instance of brush class. | |
void | set_native_brush (intptr brush) |
In a derived class, sets a reference to a GDI+ brush object. | |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | ) |
Initializes a new instance of the xtd::drawing::drawing_2d::radial_gradient_brush class with default values.
xtd::drawing::drawing_2d::linear_gradient_brush::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.
point1 | A xtd::drawing::point structure that represents the starting point of the linear gradient. |
point2 | A xtd::drawing::point structure that represents the endpoint of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::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.
point1 | A xtd::drawing::point_f structure that represents the starting point of the linear gradient. |
point2 | A xtd::drawing::point_f structure that represents the endpoint of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation.
rect | A xtd::drawing::rectangle structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
linear_gradient_mode | A xtd::drawing::drawing_2d::linear_gradient_mode enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, xtd::drawing::drawing_2d::linear_gradient_mode::forward_diagonal specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |
xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation angle.
rect | A xtd::drawing::rectangle structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
angle | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line. |
xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
linear_gradient_mode | A xtd::drawing::drawing_2d::linear_gradient_mode enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, xtd::drawing::drawing_2d::linear_gradient_mode::forward_diagonal specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |
xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation angle.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
angle | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line. |
xtd::drawing::drawing_2d::linear_gradient_brush::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.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::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.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::point & | point1, |
const xtd::drawing::point & | point2, | ||
const std::vector< xtd::drawing::color > & | linear_colors | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
point1 | A xtd::drawing::point structure that represents the starting point of the linear gradient. |
point2 | A xtd::drawing::point structure that represents the endpoint of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::point_f & | point1, |
const xtd::drawing::point_f & | point2, | ||
const std::vector< xtd::drawing::color > & | linear_colors | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified points and colors.
point1 | A xtd::drawing::point_f structure that represents the starting point of the linear gradient. |
point2 | A xtd::drawing::point_f structure that represents the endpoint of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle & | rect, |
const std::vector< 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, colors, and orientation.
rect | A xtd::drawing::rectangle structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
linear_gradient_mode | A xtd::drawing::drawing_2d::linear_gradient_mode enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, xtd::drawing::drawing_2d::linear_gradient_mode::forward_diagonal specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle & | rect, |
const std::vector< xtd::drawing::color > & | linear_colors, | ||
float | angle | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation angle.
rect | A xtd::drawing::rectangle structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
angle | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle_f & | rect, |
const std::vector< 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, colors, and orientation.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
linear_gradient_mode | A xtd::drawing::drawing_2d::linear_gradient_mode enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, xtd::drawing::drawing_2d::linear_gradient_mode::forward_diagonal specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle_f & | rect, |
const std::vector< xtd::drawing::color > & | linear_colors, | ||
float | angle | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation angle.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
angle | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle & | rect, |
const std::vector< xtd::drawing::color > & | linear_colors | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
xtd::drawing::drawing_2d::linear_gradient_brush::linear_gradient_brush | ( | const xtd::drawing::rectangle_f & | rect, |
const std::vector< xtd::drawing::color > & | linear_colors | ||
) |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle and colors.
rect | A xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient. |
color1 | A xtd::drawing::color structure that represents the starting color of the linear gradient. |
color2 | A xtd::drawing::color structure that represents the ending color of the linear gradient. |
|
noexcept |
Gets the angle of the gradient.
|
noexcept |
Sets the angle of the gradient.
value | A float that specifies the angle of the linear gradient. |
|
noexcept |
Gets the starting and ending colors of the gradient.
xtd::drawing::drawing_2d::linear_gradient_brush & xtd::drawing::drawing_2d::linear_gradient_brush::linear_colors | ( | const xtd::drawing::drawing_2d::gradient_stop_collection & | value | ) |
sets the starting and ending colors of the gradient.
value | An array of two xtd::drawing::color structures that represents the starting and ending colors of the linear gradient. |
|
noexcept |
Gets a rectangular region that defines the starting and ending points of the linear gradient.
|
noexcept |
Sets a rectangular region that defines the starting and ending points of the linear gradient.
value | A xtd::drawing::rectangle_f structure that specifies the starting and ending points of the linear gradient. |
|
noexcept |
Sets a rectangular region that defines the starting and ending points of the linear gradient.
value | A xtd::drawing::rectangle_f structure that specifies the starting and ending points of the linear gradient. |
|
virtualnoexcept |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
Reimplemented from xtd::drawing::brush.
|
inlinestaticnoexcept |
Determines whether the specified object instances are considered equal.
object_a | The first object to compare. |
object_b | The second object to compare. |