|
Blender
V2.59
|
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 46 of file ColorBlock.h.
| ColorBlock::ColorBlock | ( | ) |
Default constructor.
Definition at line 57 of file ColorBlock.cpp.
| ColorBlock::ColorBlock | ( | const uint * | linearImage | ) |
Init the color block from an array of colors.
Definition at line 62 of file ColorBlock.cpp.
| ColorBlock::ColorBlock | ( | const ColorBlock & | block | ) |
Init the color block with the contents of the given block.
Definition at line 70 of file ColorBlock.cpp.
Get block color.
Definition at line 86 of file ColorBlock.h.
References i.
Referenced by ColorBlock(), BlockDXT1::decodeBlock(), AlphaBlockDXT3::decodeBlock(), AlphaBlockDXT5::decodeBlock(), BlockATI1::decodeBlock(), BlockATI2::decodeBlock(), BlockCTX1::decodeBlock(), BlockDXT1::decodeBlockNV5x(), and init().
Get block color.
Definition at line 98 of file ColorBlock.h.
Get block color.
Definition at line 104 of file ColorBlock.h.
| const Color32 * ColorBlock::colors | ( | ) | const [inline] |
Get pointer to block colors.
Definition at line 80 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 246 of file ColorBlock.cpp.
References i.
Definition at line 84 of file ColorBlock.cpp.
References Image::height(), Image::pixels(), and Image::width().
Referenced by ColorBlock().
Definition at line 89 of file ColorBlock.cpp.
References color(), i, min, and Color32::u.
Definition at line 112 of file ColorBlock.cpp.
References Color32::a, Color32::b, clamp, color(), Color32::g, i, min, and Color32::r.
Returns true if the block has a single color.
Definition at line 165 of file ColorBlock.cpp.
References i, and Color32::u.
Definition at line 151 of file ColorBlock.cpp.
References Color32::a, Color32::b, component(), Color32::g, i, and Color32::r.