QcTexturePaint Namespace
Pixel helpers shared by the texture patterns of QcTextureSynthesizer. More...
| Header: | #include <clientcore/textures/QcTexturePaint.h> |
Types
Variables
| const int | size |
Functions
| QColor | clear() |
| quint32 | hashPixel(quint32 seed, int x, int y) |
| double | noise(quint32 seed, int x, int y) |
| QColor | scaled(const QColor &color, double factor, int alpha = 255) |
| QColor | varied(const QcTextureSpec &spec, const QColor &color, int x, int y, quint32 salt = 0) |
Detailed Description
Type Documentation
[alias] QcTexturePaint::Painter
Colour of the pixel (x, y) of a pattern; color is the varied primary colour every pattern starts from.
Variable Documentation
const int QcTexturePaint::size
Edge of a pattern's tile in pixels.
Function Documentation
QColor QcTexturePaint::clear()
Returns a fully transparent colour.
quint32 QcTexturePaint::hashPixel(quint32 seed, int x, int y)
Returns a well-mixed hash of pixel (x, y) under seed.
double QcTexturePaint::noise(quint32 seed, int x, int y)
Returns a uniform value in [-1, 1] for pixel (x, y) under seed.
QColor QcTexturePaint::scaled(const QColor &color, double factor, int alpha = 255)
Returns color with its channels multiplied by factor (clamped) and alpha alpha.
QColor QcTexturePaint::varied(const QcTextureSpec &spec, const QColor &color, int x, int y, quint32 salt = 0)
Returns color brightened or darkened at pixel (x, y) by up to the variation of spec; salt gives a different noise for the same seed.