GGUI::ImageProps struct

Image and viewport props.

Public variables

GGSize Width
Fit (unset): an image is its natural size, scaled with the UI. With one axis set, the other keeps the aspect ratio. A viewport has no natural size.
GGSize Height
as Width
GGUI::GGFit Fit
how it fits a box of another shape
GGColor Tint
multiplies the colour; its alpha fades the image
float Radius
corner radius, UI units
std::string_view Name
accessible name. Empty: decorative
std::string_view Class
GGEdges Slice
Nine-slice: borders (left, top, right, bottom) in the image's pixels that keep their size while the middle stretches. Zero: none.
float Region
The part of the image shown (x, y, width, height) in its pixels: a cell of a sheet, a portrait. Zero width: all of it. Its size is the element's natural size.
bool bFlipX
mirrored left to right
bool bFlipY
mirrored top to bottom
bool bTile
repeated at its own size to fill the element, instead of scaled
float Greyscale
0..1; bind GGProperty::Greyscale to follow data (a locked item)

Variable documentation

GGSize GGUI::ImageProps::Width

Fit (unset): an image is its natural size, scaled with the UI. With one axis set, the other keeps the aspect ratio. A viewport has no natural size.

its width

std::string_view GGUI::ImageProps::Class

style class for a background and border behind it