The image data allows you to specify the url or gradient mode.
Public Fields | |
| static const background_image | empty |
| Provides an empty xtd::forms::style_sheets::background_image object. | |
Public Properties | |
| auto | angle () const noexcept -> xtd::int32 |
| Gets the angle specifies the gradient direction. | |
| auto | angle (xtd::int32 value) noexcept -> void |
| Sets the angle specifies the gradient direction. | |
| auto | colors () const noexcept -> const xtd::array< xtd::drawing::color > & |
| Gets the colors specifies what colors to display. | |
| auto | colors (const xtd::array< xtd::drawing::color > &value) -> void |
| Sets the colors that specifies what colors to display. | |
| auto | url () const noexcept -> const xtd::uri & |
| Gets the url of image to display. | |
| auto | url (const xtd::uri &value) noexcept -> void |
| Sets the url of image to display. | |
| auto | image_type () const noexcept -> xtd::forms::style_sheets::image_type |
| Gets the image type that specifies what kind of image to display. | |
| auto | image_type (xtd::forms::style_sheets::image_type value) noexcept -> void |
| Sets the style specifies what kind of image to display. | |
Public Methods | |
| auto | equals (const xtd::object &obj) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | equals (const background_image &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 |
| Returns a xtd::string that represents the current object. | |
Public Static Methods | |
| static auto | make_brush (const xtd::forms::style_sheets::background_image &image, const xtd::drawing::rectangle &rect) -> xtd::uptr< xtd::drawing::brush > |
| Creates a xtd::drawing::brush from specified image data and rectangle. | |
Additional Inherited Members | |
| virtual auto | equals (const background_image &) const noexcept -> bool=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| 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. | |
| 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. | |
|
default |
Initializes a new instance of the xtd::forms::style_sheets::background_image class.
| Property | Default value |
|---|---|
| xtd::forms::style_sheets::background_image::angle | 180 |
| xtd::forms::style_sheets::background_image::colors | An array with one color : xtd::drawing::color::black) |
| xtd::forms::style_sheets::background_image::image_type | xtd::forms::style_sheets::image_type::none |
| xtd::forms::style_sheets::background_image::url | An empty tring ("") |
|
explicit |
Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified url.
| url | The url of image to display.
|
|
explicit |
Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified colors array.
| color | The colors that specifies the color for gradient image to display.
|
| xtd::forms::style_sheets::background_image::background_image | ( | const xtd::array< xtd::drawing::color > & | colors, |
| xtd::int32 | angle ) |
Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified colors and angle.
| color | The colors that specifies the color for gradient image to display. |
| angle | The angle specifies the gradient direction. |
| xtd::argument_exception | colors is less than 2. |
| xtd::forms::style_sheets::background_image::background_image | ( | xtd::forms::style_sheets::image_type | image_type, |
| const xtd::array< xtd::drawing::color > & | colors ) |
Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified style and colors.
| image_type | The style specifies what kind of image to display. |
| color | The colors that specifies the color for gradient image to display. |
| xtd::argument_exception | colors is less than 2. |
| xtd::not_supported_exception | if xtd::forms::style_sheets::background_image::image_type is not of xtd::forms::style_sheets::image_type::url and not xtd::forms::style_sheets::image_type::linear_gradient. |
| xtd::forms::style_sheets::background_image::background_image | ( | xtd::forms::style_sheets::image_type | image_type, |
| const xtd::array< xtd::drawing::color > & | colors, | ||
| xtd::int32 | angle ) |
Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified style, colors and angle.
| image_type | The style specifies what kind of image to display. |
| color | The colors that specifies the color for gradient image to display. |
| angle | The angle specifies the gradient direction. |
| xtd::argument_exception | colors is less than 2. |
| xtd::not_supported_exception | if xtd::forms::style_sheets::background_image::image_type is not of xtd::forms::style_sheets::image_type::url and not xtd::forms::style_sheets::image_type::linear_gradient. |
|
nodiscardnoexcept |
Gets the angle specifies the gradient direction.
|
noexcept |
Sets the angle specifies the gradient direction.
| value | The angle specifies the gradient direction. |
|
nodiscardnoexcept |
Gets the colors specifies what colors to display.
| auto xtd::forms::style_sheets::background_image::colors | ( | const xtd::array< xtd::drawing::color > & | value | ) | -> void |
Sets the colors that specifies what colors to display.
| value | The colors specifies what colors to display. |
| xtd::argument_exception | colors is less than 2. |
|
nodiscardnoexcept |
Gets the url of image to display.
|
noexcept |
Sets the url of image to display.
| value | The url of image to display. |
|
nodiscardnoexcept |
Gets the image type that specifies what kind of image to display.
|
noexcept |
Sets the style specifies what kind of image to display.
| value | The style specifies what kind of image to display. |
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridenoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
nodiscardoverridevirtualnoexcept |
Returns a xtd::string that represents the current object.
Reimplemented from xtd::object.
|
staticnodiscard |
Creates a xtd::drawing::brush from specified image data and rectangle.
| image | Contains image data. |
| rect | The xtd::drawing::rectangle neeed for linear gradient brush |
|
static |
Provides an empty xtd::forms::style_sheets::background_image object.