mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 18:41:05 +00:00
Add PixelsMovement::setMaskColor() method to change the mask color of the pixels in movement.
This commit is contained in:
parent
2f38b83ce3
commit
328fab545c
@ -171,9 +171,24 @@ public:
|
|||||||
{
|
{
|
||||||
Cel* cel = m_sprite_writer->getExtraCel();
|
Cel* cel = m_sprite_writer->getExtraCel();
|
||||||
Image* image = m_sprite_writer->getExtraCelImage();
|
Image* image = m_sprite_writer->getExtraCelImage();
|
||||||
|
|
||||||
|
ASSERT(cel != NULL);
|
||||||
|
ASSERT(image != NULL);
|
||||||
|
|
||||||
return Rect(cel->x, cel->y, image->w, image->h);
|
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();
|
return m_impl->getImageBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PixelsMovement::setMaskColor(ase_uint32 mask_color)
|
||||||
|
{
|
||||||
|
m_impl->setMaskColor(mask_color);
|
||||||
|
}
|
||||||
|
@ -46,6 +46,8 @@ public:
|
|||||||
|
|
||||||
Rect getImageBounds();
|
Rect getImageBounds();
|
||||||
|
|
||||||
|
void setMaskColor(ase_uint32 mask_color);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class PixelsMovementImpl* m_impl;
|
class PixelsMovementImpl* m_impl;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user