Blender
V3.3
|
#include <ColorBlock.h>
Public Member Functions | |
ColorBlock ()=default | |
ColorBlock (const uint *linearImage) | |
ColorBlock (const ColorBlock &block) | |
ColorBlock (const Image *img, uint x, uint y) | |
void | init (const Image *img, uint x, uint y) |
void | init (uint w, uint h, const uint *data, uint x, uint y) |
void | init (uint w, uint h, const float *data, uint x, uint y) |
void | swizzle (uint x, uint y, uint z, uint w) |
bool | isSingleColor (Color32 mask=Color32(0xFF, 0xFF, 0xFF, 0x00)) const |
bool | hasAlpha () const |
const Color32 * | colors () const |
Color32 | color (uint i) const |
Color32 & | color (uint i) |
Color32 | color (uint x, uint y) const |
Color32 & | color (uint x, uint y) |
Uncompressed 4x4 color block.
Definition at line 22 of file ColorBlock.h.
|
default |
ColorBlock::ColorBlock | ( | const uint * | linearImage | ) |
Init the color block from an array of colors.
Definition at line 35 of file ColorBlock.cpp.
References color().
ColorBlock::ColorBlock | ( | const ColorBlock & | block | ) |
Init the color block with the contents of the given block.
Definition at line 42 of file ColorBlock.cpp.
References color().
Initialize this color block.
Definition at line 49 of file ColorBlock.cpp.
Get block color.
Definition at line 68 of file ColorBlock.h.
Get block color.
Definition at line 62 of file ColorBlock.h.
Referenced by ColorBlock(), BlockDXT1::decodeBlock(), AlphaBlockDXT3::decodeBlock(), AlphaBlockDXT5::decodeBlock(), BlockATI1::decodeBlock(), BlockATI2::decodeBlock(), BlockCTX1::decodeBlock(), BlockDXT1::decodeBlockNV5x(), init(), and swizzle().
|
inline |
Get pointer to block colors.
Definition at line 56 of file ColorBlock.h.
bool ColorBlock::hasAlpha | ( | ) | const |
Return true if the block is not fully opaque.
Definition at line 219 of file ColorBlock.cpp.
Definition at line 54 of file ColorBlock.cpp.
References Image::height(), Image::pixels(), Image::width(), x, and y.
Referenced by ColorBlock().
Definition at line 59 of file ColorBlock.cpp.
References color(), data, e, MIN, Color32::u, w(), x, and y.
Returns true if the block has a single color.
Definition at line 139 of file ColorBlock.cpp.
References mask(), and Color32::u.
Definition at line 128 of file ColorBlock.cpp.
References Color32::a, Color32::b, Freestyle::c, color(), component(), Color32::g, Color32::r, w(), x, y, and z.