Add PixelsMovement::setMaskColor() method to change the mask color of the pixels in movement.

This commit is contained in:
David Capello 2010-08-11 21:41:02 -03:00
parent 2f38b83ce3
commit 328fab545c
2 changed files with 22 additions and 0 deletions

View File

@ -171,9 +171,24 @@ public:
{
Cel* cel = m_sprite_writer->getExtraCel();
Image* image = m_sprite_writer->getExtraCelImage();
ASSERT(cel != NULL);
ASSERT(image != NULL);
return Rect(cel->x, cel->y, image->w, image->h);
}
void setMaskColor(ase_uint32 mask_color)
{
Image* image = m_sprite_writer->getExtraCelImage();
ASSERT(image != NULL);
image->mask_color = mask_color;
update_screen_for_sprite(m_sprite_writer);
}
};
//////////////////////////////////////////////////////////////////////
@ -233,3 +248,8 @@ Rect PixelsMovement::getImageBounds()
{
return m_impl->getImageBounds();
}
void PixelsMovement::setMaskColor(ase_uint32 mask_color)
{
m_impl->setMaskColor(mask_color);
}

View File

@ -46,6 +46,8 @@ public:
Rect getImageBounds();
void setMaskColor(ase_uint32 mask_color);
private:
class PixelsMovementImpl* m_impl;
};