Init color block from block linear image.

2.0
castano 17 years ago
parent 1548c2ed80
commit e341366aa0

@ -28,6 +28,14 @@ ColorBlock::ColorBlock()
{
}
/// Init the color block from an array of colors.
ColorBlock::ColorBlock(const uint * linearImage)
{
for(uint i = 0; i < 16; i++) {
color(i) = Color32(linearImage[i]);
}
}
/// Init the color block with the contents of the given block.
ColorBlock::ColorBlock(const ColorBlock & block)
{

@ -14,6 +14,7 @@ namespace nv
struct ColorBlock
{
ColorBlock();
ColorBlock(const uint * linearImage);
ColorBlock(const ColorBlock & block);
ColorBlock(const Image * img, uint x, uint y);

Loading…
Cancel
Save