mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Fix ToolLoopImpl() to clear with mask_color the image used to draw.
This commit is contained in:
parent
d4f67cdb73
commit
6120c38b52
@ -1841,7 +1841,8 @@ public:
|
|||||||
if (m_cel == NULL) {
|
if (m_cel == NULL) {
|
||||||
// create the image
|
// create the image
|
||||||
m_cel_image = image_new(sprite->getImgType(), sprite->getWidth(), sprite->getHeight());
|
m_cel_image = image_new(sprite->getImgType(), sprite->getWidth(), sprite->getHeight());
|
||||||
image_clear(m_cel_image, 0);
|
image_clear(m_cel_image,
|
||||||
|
m_cel_image->mask_color);
|
||||||
|
|
||||||
// create the cel
|
// create the cel
|
||||||
m_cel = cel_new(sprite->getCurrentFrame(), 0);
|
m_cel = cel_new(sprite->getCurrentFrame(), 0);
|
||||||
@ -1873,7 +1874,8 @@ public:
|
|||||||
// create two copies of the image region which we'll modify with the tool
|
// create two copies of the image region which we'll modify with the tool
|
||||||
m_src_image = image_crop(m_cel_image,
|
m_src_image = image_crop(m_cel_image,
|
||||||
x1-m_cel->x,
|
x1-m_cel->x,
|
||||||
y1-m_cel->y, x2-x1, y2-y1, 0);
|
y1-m_cel->y, x2-x1, y2-y1,
|
||||||
|
m_cel_image->mask_color);
|
||||||
m_dst_image = image_new_copy(m_src_image);
|
m_dst_image = image_new_copy(m_src_image);
|
||||||
|
|
||||||
m_mask = m_sprite->getMask();
|
m_mask = m_sprite->getMask();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user