Blender V2.61 - r43446
|
Uncompressed 4x4 color block. More...
#include <ColorBlock.h>
Public Member Functions | |
ColorBlock () | |
Default constructor. | |
ColorBlock (const uint *linearImage) | |
Init the color block from an array of colors. | |
ColorBlock (const ColorBlock &block) | |
Init the color block with the contents of the given block. | |
ColorBlock (const Image *img, uint x, uint y) | |
Initialize this color block. | |
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 |
Returns true if the block has a single color. | |
bool | hasAlpha () const |
Count number of unique colors in this color block. | |
const Color32 * | colors () const |
Get pointer to block colors. | |
Color32 | color (uint i) const |
Get block color. | |
Color32 & | color (uint i) |
Get block color. | |
Color32 | color (uint x, uint y) const |
Get block color. | |
Color32 & | color (uint x, uint y) |
Get block color. |
Uncompressed 4x4 color block.
Definition at line 44 of file ColorBlock.h.
ColorBlock::ColorBlock | ( | ) |
Default constructor.
Definition at line 55 of file ColorBlock.cpp.
ColorBlock::ColorBlock | ( | const uint * | linearImage | ) |
Init the color block from an array of colors.
Definition at line 60 of file ColorBlock.cpp.
ColorBlock::ColorBlock | ( | const ColorBlock & | block | ) |
Init the color block with the contents of the given block.
Definition at line 68 of file ColorBlock.cpp.
Get block color.
Definition at line 84 of file ColorBlock.h.
References i.
Referenced by ColorBlock(), BlockCTX1::decodeBlock(), BlockATI2::decodeBlock(), BlockATI1::decodeBlock(), AlphaBlockDXT5::decodeBlock(), AlphaBlockDXT3::decodeBlock(), BlockDXT1::decodeBlock(), BlockDXT1::decodeBlockNV5x(), and init().
Get block color.
Definition at line 102 of file ColorBlock.h.
Get block color.
Definition at line 96 of file ColorBlock.h.
const Color32 * ColorBlock::colors | ( | ) | const [inline] |
Get pointer to block colors.
Definition at line 78 of file ColorBlock.h.
bool ColorBlock::hasAlpha | ( | ) | const |
Count number of unique colors in this color block.
Return true if the block is not fully opaque.
Definition at line 244 of file ColorBlock.cpp.
References i.
Definition at line 110 of file ColorBlock.cpp.
References Color32::a, Color32::b, clamp, color(), credits_svn_gen::e, Color32::g, i, min, Color32::r, and U.
Definition at line 87 of file ColorBlock.cpp.
References color(), credits_svn_gen::e, i, min, Color32::u, and U.
Definition at line 82 of file ColorBlock.cpp.
References Image::height(), Image::pixels(), and Image::width().
Referenced by ColorBlock().
Returns true if the block has a single color.
Definition at line 163 of file ColorBlock.cpp.
References i, and Color32::u.
Definition at line 149 of file ColorBlock.cpp.
References Color32::a, Color32::b, component(), Color32::g, i, and Color32::r.