Struct · aurore

aurore::ThemeImage

On this page
aurore/core/theme_image.hpp
#include <aurore/core/theme_image.hpp>

struct aurore::ThemeImage

Description

A picture a theme file names (its background_image, its logo, icons, preview, an app's image slots): a texture made from it, at most MAX_WIDTH x MAX_HEIGHT (or its options' maxSide). Only the UI thread reads or changes it.

Types 1

enum class State
Value
LOADING
READY
FAILED

theme_image.hpp:50

Constructors 3

ThemeImage() =default
ThemeImage(const ThemeImage &) =delete
~ThemeImage()

Functions 3

bool ready() const
bool draw(NVGcontext *vg,float x,float y,float width,float height,BackgroundFit fit,const NVGcolor *tint = nullptr,float alpha = 1.0f,float corner = 0.0f) const

Draws it in the box x, y, width, height: CONTAIN fits it whole, centred, its ratio kept; COVER fills the box, centred, cut at its edges, within a rounded rectangle of corner; TILE and CENTER as background_fit says. tint (a mask's colour, ThemeImageOptions::mask) multiplies its pixels; else drawn as is, at alpha. False, nothing drawn, while it is not ready.

theme_image.hpp:76
ThemeImage & operator=(const ThemeImage &) =delete

Attributes 9

std::string path
int flags = 0
int maxSide = 0
bool mask = false
int texture = 0
int width = 0
int height = 0
NVGcolor mean {}

Read from Aurore's headers by Doxygen at each build · library/include