mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix center of eraser edges is wrong
This commit is contained in:
parent
0c6e8de9e5
commit
6afd31698f
@ -398,6 +398,9 @@ void BrushPreview::generateBoundaries()
|
||||
m_brushBoundaries.reset(
|
||||
new MaskBoundaries(mask ? mask: brushImage));
|
||||
|
||||
m_brushBoundaries->offset(-brush->center().x,
|
||||
-brush->center().y);
|
||||
|
||||
if (deleteMask)
|
||||
delete mask;
|
||||
}
|
||||
@ -505,9 +508,6 @@ void BrushPreview::traceBrushBoundaries(ui::Graphics* g,
|
||||
gfx::Color color,
|
||||
PixelDelegate pixelDelegate)
|
||||
{
|
||||
pos.x -= m_brushWidth/2;
|
||||
pos.y -= m_brushHeight/2;
|
||||
|
||||
for (const auto& seg : *m_brushBoundaries) {
|
||||
gfx::Rect bounds = seg.bounds();
|
||||
bounds.offset(pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user