QcTextureEmblem Namespace
The pattern "emblem" (decision E-241): pixel art from a small bitmap in the content data, on woven cloth in the primary colour. More...
| Header: | #include <clientcore/textures/QcTextureEmblem.h> |
Functions
| QColor | paint(const QcTextureSpec &spec, int x, int y, QColor color) |
| QColor | paintIcon(const QcTextureSpec &spec, int x, int y, QColor color) |
| QcResult<QcTextureSpec> | read(const QJsonObject &json, QcTextureSpec spec) |
Detailed Description
Cape emblems are drawn this way, so the motif is data and a mod can exchange it without code.
Function Documentation
QColor QcTextureEmblem::paint(const QcTextureSpec &spec, int x, int y, QColor color)
Returns the colour of pixel (x, y) of spec: the palette's colour for the bitmap's character there, else cloth in color.
QColor QcTextureEmblem::paintIcon(const QcTextureSpec &spec, int x, int y, QColor color)
Returns the pattern "icon": the palette's colour for the character of the bitmap of spec at (x, y), else transparent; color is unused.
QcResult<QcTextureSpec> QcTextureEmblem::read(const QJsonObject &json, QcTextureSpec spec)
Returns spec with "bitmap" (an array of strings) and "palette" (character -> "#rrggbb") read from json, a texture definition; the problem when they are malformed.