Fix isColorNoAlpha, but leave it commented out.

pull/216/head
castano 14 years ago
parent 558f7970b1
commit 96f22f8cd4

@ -175,6 +175,7 @@ bool ColorBlock::isSingleColor() const
return true;
}
/*
/// Returns true if the block has a single color, ignoring transparent pixels.
bool ColorBlock::isSingleColorNoAlpha() const
{
@ -182,7 +183,10 @@ bool ColorBlock::isSingleColorNoAlpha() const
int i;
for(i = 0; i < 16; i++)
{
if (m_color[i].a != 0) c = m_color[i];
if (m_color[i].a != 0) {
c = m_color[i];
break;
}
}
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
@ -198,6 +202,7 @@ bool ColorBlock::isSingleColorNoAlpha() const
return true;
}
*/
/// Count number of unique colors in this color block.
uint ColorBlock::countUniqueColors() const

@ -24,7 +24,7 @@ namespace nv
void swizzle(uint x, uint y, uint z, uint w); // 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0
bool isSingleColor() const;
bool isSingleColorNoAlpha() const;
//bool isSingleColorNoAlpha() const;
uint countUniqueColors() const;
Color32 averageColor() const;
bool hasAlpha() const;

Loading…
Cancel
Save