One background item used in AttributeBackground.
More...
#include <Stylish/Background.hpp>
|
| enum | BgSize {
SIZE_CONTAIN,
SIZE_COVER,
SIZE_LENGTH,
SIZE_PERCENTAGE,
SIZE_AUTO
} |
| | Background size or unit. More... |
| |
| enum | Box { BORDER_BOX,
PADDING_BOX,
CONTENT_BOX
} |
| | Painting and positioning area. More... |
| |
| enum | PositionOrigin {
ORIGIN_LEFT,
ORIGIN_CENTER,
ORIGIN_RIGHT,
ORIGIN_TOP,
ORIGIN_BOTTOM,
ORIGIN_NONE
} |
| | Background positioning area. More... |
| |
| enum | RepeatStyle { STYLE_REPEAT,
STYLE_SPACE,
STYLE_ROUND,
STYLE_NO_REPEAT
} |
| | Image repeat style. More... |
| |
|
| const std::array< BgSize, 2 > & | bgSize () const |
| |
| const Box & | clip () const |
| |
| Luminous::MipmapPtr & | image () |
| |
| const Luminous::MipmapPtr & | image () const |
| | More... |
| |
| const Box & | origin () const |
| |
| const Nimble::Vector2f & | position () const |
| |
const std::array
< PositionOrigin, 2 > & | positionOrigins () const |
| | Position origin specifies the coordinate system for background position. More... |
| |
const std::array
< Valuable::Attribute::ValueUnit, 2 > & | positionUnits () const |
| |
| const std::array< RepeatStyle, 2 > & | repeat () const |
| | If the image size is smaller than the painting area, image will be repeated in X and Y directions using this setting. More... |
| |
| void | setBgSize (std::array< BgSize, 2 > bgSize) |
| |
| void | setClip (const Box &clip) |
| |
| void | setImage (const Luminous::MipmapPtr &image) |
| | Assigns a mipmap instance to this background image. More... |
| |
| void | setOrigin (const Box &origin) |
| |
| void | setPosition (const Nimble::Vector2f &position) |
| |
| void | setPositionOrigins (const std::array< PositionOrigin, 2 > &positionOrigins) |
| |
| void | setPositionUnits (const std::array< Valuable::Attribute::ValueUnit, 2 > &positionUnits) |
| |
| void | setRepeat (const std::array< RepeatStyle, 2 > &repeat) |
| |
| void | setRepeat (RepeatStyle x, RepeatStyle y) |
| |
| void | setSize (const Nimble::SizeF &size) |
| |
| const Nimble::SizeF & | size () const |
| |
One background item used in AttributeBackground.
| const std::array<BgSize, 2>& Stylish::BackgroundImage::bgSize |
( |
| ) |
const |
|
inline |
| const Box& Stylish::BackgroundImage::clip |
( |
| ) |
const |
|
inline |
- Returns
- mipmap used in this background image
- Returns
- mipmap used in this background image
| const Box& Stylish::BackgroundImage::origin |
( |
| ) |
const |
|
inline |
| static STYLISH_API PositionOrigin Stylish::BackgroundImage::parsePosition |
( |
const QString & |
str | ) |
|
|
static |
Converts a string to PositionOrigin.
- Parameters
-
| str | "left", "center", "right", "top", "bottom" or any other string |
- Returns
- ORIGIN_LEFT, ORIGIN_CENTER, ORIGIN_RIGHT, ORIGIN_TOP, ORIGIN_BOTTOM or ORIGIN_NONE
| const std::array<PositionOrigin, 2>& Stylish::BackgroundImage::positionOrigins |
( |
| ) |
const |
|
inline |
| const std::array<RepeatStyle, 2>& Stylish::BackgroundImage::repeat |
( |
| ) |
const |
|
inline |
| void Stylish::BackgroundImage::setBgSize |
( |
std::array< BgSize, 2 > |
bgSize | ) |
|
|
inline |
- See Also
- bgSize
- Parameters
-
| bgSize | new background sizes in X and Y directions |
| void Stylish::BackgroundImage::setClip |
( |
const Box & |
clip | ) |
|
|
inline |
- See Also
- clip
- Parameters
-
| clip | new background painting area |
Assigns a mipmap instance to this background image.
- Parameters
-
| void Stylish::BackgroundImage::setOrigin |
( |
const Box & |
origin | ) |
|
|
inline |
- See Also
- origin
- Parameters
-
| origin | new background positioning are |
- Parameters
-
| position | new background position |
- See Also
- position()
| void Stylish::BackgroundImage::setPositionOrigins |
( |
const std::array< PositionOrigin, 2 > & |
positionOrigins | ) |
|
|
inline |
- See Also
- positionOrigins
- Parameters
-
| positionOrigins | new background origins for X and Y direction |
| void Stylish::BackgroundImage::setRepeat |
( |
const std::array< RepeatStyle, 2 > & |
repeat | ) |
|
|
inline |
- Parameters
-
| repeat | repeat style for X and Y directions |
- See Also
- repeat
- Parameters
-
| x,y | repeat style for X and Y directions |
- See Also
- repeat
| void Stylish::BackgroundImage::setSize |
( |
const Nimble::SizeF & |
size | ) |
|
|
inline |
- Returns
- background size, value interpretation depends on bgSize