mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fix paint bucket and magic wand tools for tilemaps
This commit is contained in:
parent
559a244e6a
commit
a6302b91f7
@ -431,11 +431,24 @@ public:
|
||||
else {
|
||||
Cel* cel = m_layer->cel(m_frame);
|
||||
if (cel && (cel->x() != 0 || cel->y() != 0)) {
|
||||
m_floodfillSrcImage = Image::create(m_sprite->pixelFormat(),
|
||||
m_sprite->width(),
|
||||
m_sprite->height());
|
||||
m_floodfillSrcImage = Image::create(m_sprite->spec());
|
||||
m_floodfillSrcImage->clear(m_sprite->transparentColor());
|
||||
copy_image(m_floodfillSrcImage, cel->image(), cel->x(), cel->y());
|
||||
if (cel->image()->pixelFormat() == IMAGE_TILEMAP) {
|
||||
render::Render render;
|
||||
render.setNewBlend(Preferences::instance().experimental.newBlend());
|
||||
render.renderCel(
|
||||
m_floodfillSrcImage,
|
||||
m_sprite,
|
||||
cel->image(),
|
||||
m_layer,
|
||||
m_sprite->palette(m_frame),
|
||||
gfx::RectF(cel->bounds()),
|
||||
gfx::Clip(m_sprite->bounds()),
|
||||
255, BlendMode::NORMAL);
|
||||
}
|
||||
else {
|
||||
copy_image(m_floodfillSrcImage, cel->image(), cel->x(), cel->y());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user