xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <linear_gradient_brush.h>
Encapsulates a xtd::drawing::brush with a linear gradient. This class cannot be inherited.
Inherits xtd::drawing::brush.
Public Member Functions | |
linear_gradient_brush () | |
Initializes a new instance of the linear_gradient_brush class. More... | |
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. More... | |
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. More... | |
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. More... | |
linear_gradient_brush (const xtd::drawing::rectangle &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, xtd::drawing::drawing2d::linear_gradient_mode linear_gradient_mode) | |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation. More... | |
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. More... | |
linear_gradient_brush (const xtd::drawing::rectangle_f &rect, const xtd::drawing::color &color1, const xtd::drawing::color &color2, xtd::drawing::drawing2d::linear_gradient_mode linear_gradient_mode) | |
Initializes a new instance of the linear_gradient_brush class with the specified rectangle, colors, and orientation. More... | |
std::array< xtd::drawing::color, 2 > & | linear_colors () |
Gets the starting and ending colors of the gradient. More... | |
const std::array< xtd::drawing::color, 2 > & | linear_colors () const |
Gets the starting and ending colors of the gradient. More... | |
xtd::drawing::drawing2d::linear_gradient_brush & | linear_colors (const std::array< xtd::drawing::color, 2 > &linear_colors) |
sets the starting and ending colors of the gradient. More... | |
xtd::drawing::rectangle_f | rectangle () const |
Gets a rectangular region that defines the starting and ending points of the gradient. More... | |
Public Member Functions inherited from xtd::drawing::brush | |
xtd::ustring | to_string () const noexcept override |
Converts this brush object to a human-readable string. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
Protected Member Functions inherited from xtd::drawing::brush | |
brush () | |
Initialize a new instance of brush class. More... | |
void | set_native_brush (intptr_t brush) |
In a derived class, sets a reference to a GDI+ brush object. More... | |
xtd::drawing::drawing2d::linear_gradient_brush::linear_gradient_brush | ( | ) |
Initializes a new instance of the linear_gradient_brush class.
|
inline |
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. |
|
inline |
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. |
|
inline |
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. |
|
inline |
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::drawing2d::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::drawing2d::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. |
|
inline |
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. |
|
inline |
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::drawing2d::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::drawing2d::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. |
|
inline |
Gets the starting and ending colors of the gradient.
|
inline |
Gets the starting and ending colors of the gradient.
xtd::drawing::drawing2d::linear_gradient_brush& xtd::drawing::drawing2d::linear_gradient_brush::linear_colors | ( | const std::array< xtd::drawing::color, 2 > & | linear_colors | ) |
sets the starting and ending colors of the gradient.
linear_colors | An array of two xtd::drawing::color structures that represents the starting and ending colors of the gradient. |
xtd::drawing::rectangle_f xtd::drawing::drawing2d::linear_gradient_brush::rectangle | ( | ) | const |
Gets a rectangular region that defines the starting and ending points of the gradient.