AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ass::BackgroundImage Struct Reference

Represents textured (image) background. More...

Detailed Description

Represents textured (image) background.

Public Member Functions

 BackgroundImage (std::nullptr_t)
 
 BackgroundImage (const unset_wrap< std::variant< AString, _< IDrawable > > > &url, const unset_wrap< AColor > &overlayColor={}, const unset_wrap< Repeat > &rep={}, const unset_wrap< Sizing > &sizing={}, const unset_wrap< glm::vec2 > &scale={}, const unset_wrap< float > &dpiMargin={})
 

Signals and public fields

unset_wrap< std::variant< AString, _< IDrawable > > > image
 Url to the image. More...
 
unset_wrap< AColoroverlayColor
 Multiply color filter to the image. More...
 
unset_wrap< Repeat > rep
 Repeating. See Repeat.
 
unset_wrap< Sizingsizing
 Sizing. See ass::Sizing.
 
unset_wrap< glm::vec2 > scale
 Scale of the image by x and y axis. Default is { 1.0, 1.0 }.
 
unset_wrap< float > dpiMargin
 DPI multiplier used to underscale or upperscale the icon. More...
 

Member Data Documentation

◆ dpiMargin

unset_wrap<float> ass::BackgroundImage::dpiMargin

DPI multiplier used to underscale or upperscale the icon.

In example, you may use 64x64 png icons and set the dpiMargin to 2.0. They will be rendered as 32px icons on 100% scale (instead of 64px), and 64px on 200% scale, remaining crisp. On 300% scale, however, they will be rendered as 96px images, thus becoming blurry, hence usage of SVG icons is recommended.

◆ image

unset_wrap<std::variant<AString, _<IDrawable> > > ass::BackgroundImage::image

Url to the image.

In example, ":icon.svg" references to icon.svg file in your assets. See AUrl for more info.

◆ overlayColor

unset_wrap<AColor> ass::BackgroundImage::overlayColor

Multiply color filter to the image.

It allows to replace the color of white icons to the specified overlayColor.

Gray color multiplied by the specified one gives the darker color.

Black color is not affected.

#include <AUI/ASS/Property/BackgroundImage.h>


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