mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix eraser tool/stylus tip when dynamics for gradients are on
This commit is contained in:
parent
7b105261ea
commit
a54e2ce13f
@ -81,6 +81,7 @@ public:
|
||||
int x = pt.x;
|
||||
int y = pt.y;
|
||||
|
||||
Ink* ink = loop->getInk();
|
||||
Brush* brush = loop->getBrush();
|
||||
|
||||
// Dynamics
|
||||
@ -145,7 +146,7 @@ public:
|
||||
|
||||
// Dynamic gradient with dithering
|
||||
bool prepareInk = false;
|
||||
if (m_hasDynamicGradient &&
|
||||
if (m_hasDynamicGradient && !ink->isEraser() &&
|
||||
(m_dynamics.ditheringMatrix.rows() > 1 ||
|
||||
m_dynamics.ditheringMatrix.cols() > 1)) {
|
||||
convert_bitmap_brush_to_dithering_brush(
|
||||
@ -164,7 +165,7 @@ public:
|
||||
|
||||
if (prepareInk) {
|
||||
// Prepare ink for the new brush
|
||||
loop->getInk()->prepareInk(loop);
|
||||
ink->prepareInk(loop);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,11 +206,11 @@ public:
|
||||
y = wrap_value(y, loop->sprite()->height());
|
||||
}
|
||||
|
||||
loop->getInk()->prepareForPointShape(loop, m_firstPoint, x, y);
|
||||
ink->prepareForPointShape(loop, m_firstPoint, x, y);
|
||||
|
||||
for (auto scanline : *m_compressedImage) {
|
||||
int u = x+scanline.x;
|
||||
loop->getInk()->prepareVForPointShape(loop, y+scanline.y);
|
||||
ink->prepareVForPointShape(loop, y+scanline.y);
|
||||
doInkHline(u, y+scanline.y, u+scanline.w-1, loop);
|
||||
}
|
||||
m_firstPoint = false;
|
||||
|
@ -175,7 +175,8 @@ public:
|
||||
// Use overlap trace policy for dynamic gradient
|
||||
if (m_dynamics.isDynamic() &&
|
||||
m_dynamics.gradient != tools::DynamicSensor::Static &&
|
||||
m_controller->isFreehand()) {
|
||||
m_controller->isFreehand() &&
|
||||
!m_ink->isEraser()) {
|
||||
// Use overlap trace policy to accumulate changes of colors
|
||||
// between stroke points.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user