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 Constructors | |
| background_image ()=default | |
| Initializes a new instance of the xtd::forms::style_sheets::background_image class. | |
| background_image (const xtd::string &url) | |
| Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified url. | |
| background_image (const xtd::array< xtd::drawing::color > &colors) | |
| Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified colors array. | |
| background_image (const xtd::array< xtd::drawing::color > &colors, int32 angle) | |
| Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified colors and angle. | |
| background_image (xtd::forms::style_sheets::image_type image_typeimage_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. | |
| background_image (xtd::forms::style_sheets::image_type image_typeimage_type, const xtd::array< xtd::drawing::color > &colors, int32 angle) | |
| Initializes a new instance of the xtd::forms::style_sheets::background_image class with specified style, colors and angle. | |
Public Properties | |
| int32 | angle () const noexcept |
| Gets the angle specifies the gradient direction. | |
| void | angle (int32 value) noexcept |
| Sets the angle specifies the gradient direction. | |
| const xtd::array< xtd::drawing::color > & | colors () const noexcept |
| Gets the colors specifies what colors to display. | |
| void | colors (const xtd::array< xtd::drawing::color > &value) |
| Sets the colors that specifies what colors to display. | |
| const xtd::uri & | url () const noexcept |
| Gets the url of image to display. | |
| void | url (const xtd::uri &value) noexcept |
| Sets the url of image to display. | |
| xtd::forms::style_sheets::image_type | image_type () const noexcept |
| Gets the image type that specifies what kind of image to display. | |
| void | image_type (xtd::forms::style_sheets::image_type value) noexcept |
| Sets the style specifies what kind of image to display. | |
Public Methods | |
| bool | equals (const xtd::object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| bool | equals (const background_image &other) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| xtd::usize | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type. | |
| xtd::string | to_string () const noexcept override |
| Returns a xtd::string that represents the current object. | |
Public Static Methods | |
| static xtd::uptr< xtd::drawing::brush > | make_brush (const xtd::forms::style_sheets::background_image &image, const xtd::drawing::rectangle &rect) |
| 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, |
| 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, | ||
| 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. |
|
noexcept |
Gets the angle specifies the gradient direction.
|
noexcept |
Sets the angle specifies the gradient direction.
| value | The angle specifies the gradient direction. |
|
noexcept |
Gets the colors specifies what colors to display.
| void xtd::forms::style_sheets::background_image::colors | ( | const xtd::array< xtd::drawing::color > & | value | ) |
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. |
|
noexcept |
Gets the url of image to display.
|
noexcept |
Sets the url of image to display.
| value | The url of image to display. |
|
noexcept |
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. |
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
overridenoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
overridevirtualnoexcept |
Returns a xtd::string that represents the current object.
Reimplemented from xtd::object.
|
static |
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.