18#include <AUI/Render/IRenderer.h>
19#include <AUI/Common/IStringable.h>
89struct BackgroundImage {
138 const unset_wrap<Repeat>&
rep = {},
const unset_wrap<Sizing>&
sizing = {},
const unset_wrap<glm::vec2>&
scale = {},
152 void applyFor(
AView* view)
override;
155 PropertySlot getPropertySlot()
const override;
158 const auto& value()
const noexcept {
Represents a Unicode character string.
Definition AString.h:37
Base class of all UI objects.
Definition AView.h:78
Object that can be converted to string.
Definition IStringable.h:29
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
Sizing
Determines sizing rules of a background texture (BackgroundImage).
Definition BackgroundImage.h:27
@ FIT
Resize image to view's area without keeping aspect ratio.
Definition BackgroundImage.h:36
@ FIT_PADDING
Resize image to view's content area without keeping aspect ratio.
Definition BackgroundImage.h:51
@ CONTAIN
Resize image to view's area keeping aspect ratio and keeping space not covered by the image....
Definition BackgroundImage.h:63
@ COVER
Resize image to view's area keeping aspect ratio and cutting of excess parts. Matches CSS background-...
Definition BackgroundImage.h:57
@ CROPPED
Texture is cropped by BackgroundCropping rule.
Definition BackgroundImage.h:82
@ CONTAIN_PADDING
Resize image to view's content area keeping aspect ratio and keeping space not covered by the image....
Definition BackgroundImage.h:69
@ SPLIT_2X2
Texture divided by 4 parts of the same size, keeping their original size. Useful for textured buttons...
Definition BackgroundImage.h:77
@ NONE
Image is kept in it's original size.
Definition BackgroundImage.h:31
@ CENTER
Center the image.
Definition BackgroundImage.h:41
@ TILE
Tile texture. Use with Repeat::X_y.
Definition BackgroundImage.h:46
#define AUI_ENUM_VALUES(enum_t,...)
Defines all enum values for AEnumerate.
Definition AEnumerate.h:208
Render context passed to AView::render.
Definition ARenderContext.h:43
Represents textured (image) background.
Definition BackgroundImage.h:89
unset_wrap< float > dpiMargin
DPI multiplier used to underscale or upperscale the icon.
Definition BackgroundImage.h:130
unset_wrap< std::variant< AString, _< IDrawable > > > image
Url to the image.
Definition BackgroundImage.h:95
unset_wrap< glm::vec2 > scale
Scale of the image by x and y axis. Default is { 1.0, 1.0 }.
Definition BackgroundImage.h:121
unset_wrap< Repeat > rep
Repeating. See Repeat.
Definition BackgroundImage.h:111
unset_wrap< Sizing > sizing
Sizing. See ass::Sizing.
Definition BackgroundImage.h:116
unset_wrap< AColor > overlayColor
Multiply color filter to the image.
Definition BackgroundImage.h:106
Base class for all properties.
Definition IPropertyBase.h:50
AString toString() const override