xtd 1.0.0
Loading...
Searching...
No Matches
xtd::drawing::drawing_2d::linear_gradient_brush Class Referencefinal
Inheritance diagram for xtd::drawing::drawing_2d::linear_gradient_brush:
xtd::drawing::brush xtd::object xtd::iequatable< brush > xtd::interface xtd::extensions::equality_operators< brush, iequatable< brush > >

Definition

Encapsulates a xtd::drawing::brush with a linear gradient. This class cannot be inherited.

Namespace
xtd::drawing::drawing_2d
Library
xtd.drawing
Examples
The following code example demonstrates the use of linear_gradient_brush class.
#include <xtd/xtd>
namespace fill_rectangle_example {
class form1 : public form {
public:
form1() {
text("Fill rectangle example");
client_size({680, 340});
}
protected:
void on_paint(paint_event_args& e) override {
form::on_paint(e);
auto back_color = color::navy;
auto fore_color = color::white;
e.graphics().fill_rectangle(solid_brush {color::transparent}, rectangle {10, 10, 150, 150});
e.graphics().draw_rectangle(pen {fore_color, 4}, rectangle {10, 10, 150, 150});
e.graphics().fill_rectangle(solid_brush {back_color}, rectangle {180, 10, 150, 150});
e.graphics().draw_rectangle(pen {fore_color, 4}, rectangle {180, 10, 150, 150});
e.graphics().fill_rectangle(texture_brush {create_circle_texture(fore_color, back_color)}, rectangle {350, 10, 150, 150});
e.graphics().draw_rectangle(pen {fore_color, 4}, rectangle {350, 10, 150, 150});
e.graphics().fill_rectangle(drawing_2d::hatch_brush {drawing_2d::hatch_style::diagonal_brick, color::white, back_color}, rectangle {520, 10, 150, 150});
e.graphics().draw_rectangle(pen {color::white, 4}, rectangle {520, 10, 150, 150});
e.graphics().fill_rectangle(drawing_2d::conical_gradient_brush {point {85, 255}, back_color, fore_color, 0}, rectangle {10, 180, 150, 150});
e.graphics().draw_rectangle(pen {color::white, 4}, rectangle {10, 180, 150, 150});
e.graphics().fill_rectangle(drawing_2d::linear_gradient_brush {rectangle {180, 180, 150, 150}, back_color, fore_color, 315}, rectangle {180, 180, 150, 150});
e.graphics().draw_rectangle(pen {color::white, 4}, rectangle {180, 180, 150, 150});
e.graphics().fill_rectangle(drawing_2d::radial_gradient_brush {point {425, 255}, fore_color, back_color, 73}, rectangle {350, 180, 150, 150});
e.graphics().draw_rectangle(pen {color::white, 4}, rectangle {350, 180, 150, 150});
}
private:
auto create_circle_texture(const color& fore_color, const color& back_color)->image {
auto texture = bitmap {16, 16};
auto graphics = texture.create_graphics();
graphics.fill_ellipse(solid_brush {back_color}, 1, 1, texture.width() - 2, texture.height() - 2);
graphics.draw_ellipse(pen {fore_color, 2}, 1, 1, texture.width() - 2, texture.height() - 2);
return texture;
}
};
}
auto main() -> int {
application::run(fill_rectangle_example::form1 {});
}
static const xtd::drawing::color transparent
Gets a system-defined color that has an ARGB value of 0x00000000. This field is constant.
Definition color.hpp:62
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition color.hpp:476
static const xtd::drawing::color navy
Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant.
Definition color.hpp:350
Defines a xtd::drawing::brush of a single color. Brushes are used to fill graphics shapes,...
Definition solid_brush.hpp:29
@ e
The E key.
Definition console_key.hpp:96
@ point
Specifies a printer's point (1/72 inch) as the unit of measure.
Definition graphics_unit.hpp:25
The xtd::drawing::text namespace provides advanced GDI+ typography functionality.
Definition font_collection.hpp:14
Examples
form_paint.cpp, and graphics.cpp.

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_modelinear_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_modelinear_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 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::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.
 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_modelinear_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::array< 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 xtd::array< xtd::drawing::color > &linear_colors, xtd::drawing::drawing_2d::linear_gradient_mode linear_gradient_modelinear_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::array< 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 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_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.

Public Properties

auto angle () const noexcept -> float
 Gets the angle of the gradient.
auto angle (float value) noexcept -> linear_gradient_brush &
 Sets the angle of the gradient.
auto linear_colors () const noexcept -> const xtd::drawing::drawing_2d::gradient_stop_collection &
 Gets the starting and ending colors of the gradient.
auto linear_colors (const xtd::drawing::drawing_2d::gradient_stop_collection &value) -> linear_gradient_brush &
 sets the starting and ending colors of the gradient.
auto rectangle () const noexcept -> const xtd::drawing::rectangle_f &
 Gets a rectangular region that defines the starting and ending points of the linear gradient.
auto rectangle (const xtd::drawing::rectangle_f &value) noexcept -> linear_gradient_brush &
 Sets a rectangular region that defines the starting and ending points of the linear gradient.
auto rectangle (const xtd::drawing::rectangle &value) noexcept -> linear_gradient_brush &
 Sets a rectangular region that defines the starting and ending points of the linear gradient.

Additional Inherited Members

auto handle () const noexcept -> intptr
 Gets the handle of the brush.
auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const brush &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto get_hash_code () const noexcept -> xtd::usize override
 Serves as a hash function for a particular type.
auto to_string () const noexcept -> xtd::string override
 Converts this brush object to a human-readable string.
 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto equals (const brush &) const noexcept -> bool=0
 Indicates whether the current object is equal to another object of the same type.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.
 brush ()
 Initialize a new instance of brush class.
auto set_native_brush (intptr brush) -> void
 In a derived class, sets a reference to a GDI+ brush object.

Constructor & Destructor Documentation

◆ linear_gradient_brush() [1/17]

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.

Remarks
Rectanlge is set to {0, 0, 0, 0} and colors are set with two transparent colors.

◆ linear_gradient_brush() [2/17]

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.

Parameters
point1A xtd::drawing::point structure that represents the starting point of the linear gradient.
point2A xtd::drawing::point structure that represents the endpoint of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [3/17]

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.

Parameters
point1A xtd::drawing::point_f structure that represents the starting point of the linear gradient.
point2A xtd::drawing::point_f structure that represents the endpoint of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [4/17]

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.

Parameters
rectA xtd::drawing::rectangle structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
linear_gradient_modeA 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.

◆ linear_gradient_brush() [5/17]

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.

Parameters
rectA xtd::drawing::rectangle structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
angleThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.

◆ linear_gradient_brush() [6/17]

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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
linear_gradient_modeA 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.

◆ linear_gradient_brush() [7/17]

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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
angleThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.

◆ linear_gradient_brush() [8/17]

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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [9/17]

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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [10/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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.

Parameters
point1A xtd::drawing::point structure that represents the starting point of the linear gradient.
point2A xtd::drawing::point structure that represents the endpoint of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [11/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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.

Parameters
point1A xtd::drawing::point_f structure that represents the starting point of the linear gradient.
point2A xtd::drawing::point_f structure that represents the endpoint of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [12/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation.

Parameters
rectA xtd::drawing::rectangle structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
linear_gradient_modeA 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.

◆ linear_gradient_brush() [13/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation angle.

Parameters
rectA xtd::drawing::rectangle structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
angleThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.

◆ linear_gradient_brush() [14/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
linear_gradient_modeA 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.

◆ linear_gradient_brush() [15/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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, colors, and orientation angle.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.
angleThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.

◆ linear_gradient_brush() [16/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

◆ linear_gradient_brush() [17/17]

xtd::drawing::drawing_2d::linear_gradient_brush::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.

Parameters
rectA xtd::drawing::rectangle_f structure that specifies the bounds of the linear gradient.
color1A xtd::drawing::color structure that represents the starting color of the linear gradient.
color2A xtd::drawing::color structure that represents the ending color of the linear gradient.

Member Function Documentation

◆ angle() [1/2]

auto xtd::drawing::drawing_2d::linear_gradient_brush::angle ( ) const -> float
nodiscardnoexcept

Gets the angle of the gradient.

Returns
A float that specifies the angle of the linear gradient.

◆ angle() [2/2]

auto xtd::drawing::drawing_2d::linear_gradient_brush::angle ( float value) -> linear_gradient_brush &
noexcept

Sets the angle of the gradient.

Parameters
valueA float that specifies the angle of the linear gradient.
Returns
Current linear_gradient_brush instance.

◆ linear_colors() [1/2]

auto xtd::drawing::drawing_2d::linear_gradient_brush::linear_colors ( ) const -> const xtd::drawing::drawing_2d::gradient_stop_collection &
nodiscardnoexcept

Gets the starting and ending colors of the gradient.

Returns
An array of two xtd::drawing::color structures that represents the starting and ending colors of the linear gradient.

◆ linear_colors() [2/2]

auto xtd::drawing::drawing_2d::linear_gradient_brush::linear_colors ( const xtd::drawing::drawing_2d::gradient_stop_collection & value) -> linear_gradient_brush &

sets the starting and ending colors of the gradient.

Parameters
valueAn array of two xtd::drawing::color structures that represents the starting and ending colors of the linear gradient.
Returns
Current linear_gradient_brush instance.

◆ rectangle() [1/3]

auto xtd::drawing::drawing_2d::linear_gradient_brush::rectangle ( ) const -> const xtd::drawing::rectangle_f &
nodiscardnoexcept

Gets a rectangular region that defines the starting and ending points of the linear gradient.

Returns
A xtd::drawing::rectangle_f structure that specifies the starting and ending points of the linear gradient.

◆ rectangle() [2/3]

auto xtd::drawing::drawing_2d::linear_gradient_brush::rectangle ( const xtd::drawing::rectangle_f & value) -> linear_gradient_brush &
noexcept

Sets a rectangular region that defines the starting and ending points of the linear gradient.

Parameters
valueA xtd::drawing::rectangle_f structure that specifies the starting and ending points of the linear gradient.
Returns
Current linear_gradient_brush instance.

◆ rectangle() [3/3]

auto xtd::drawing::drawing_2d::linear_gradient_brush::rectangle ( const xtd::drawing::rectangle & value) -> linear_gradient_brush &
noexcept

Sets a rectangular region that defines the starting and ending points of the linear gradient.

Parameters
valueA xtd::drawing::rectangle_f structure that specifies the starting and ending points of the linear gradient.
Returns
Current linear_gradient_brush instance.

The documentation for this class was generated from the following file: