|
Blender
V2.93
|
#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 36 of file ColorBlock.h.
|
default |
| ColorBlock::ColorBlock | ( | const uint * | linearImage | ) |
Init the color block from an array of colors.
Definition at line 50 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 58 of file ColorBlock.cpp.
References color().
Initialize this color block.
Definition at line 66 of file ColorBlock.cpp.
Get block color.
Definition at line 77 of file ColorBlock.h.
Get block color.
Definition at line 71 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 65 of file ColorBlock.h.
| bool ColorBlock::hasAlpha | ( | ) | const |
Return true if the block is not fully opaque.
Definition at line 239 of file ColorBlock.cpp.
Definition at line 71 of file ColorBlock.cpp.
References Image::height(), Image::pixels(), Image::width(), x, and y.
Referenced by ColorBlock().
Definition at line 76 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 158 of file ColorBlock.cpp.
References mask(), and Color32::u.
Definition at line 146 of file ColorBlock.cpp.
References Color32::a, Color32::b, Freestyle::c, color(), component(), Color32::g, Color32::r, w(), x, y, and z.