Init color block from block linear image.

This commit is contained in:
castano 2007-07-09 10:32:39 +00:00
parent 1548c2ed80
commit e341366aa0
2 changed files with 9 additions and 0 deletions

View File

@ -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)
{

View File

@ -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);