mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-22 06:41:08 +00:00
Fix problem showing brush boundaries when the active shade includes index 0
This commit is contained in:
parent
e8ecbbb4d7
commit
3252013134
@ -51,6 +51,9 @@ namespace app {
|
||||
// Returns true if this ink picks colors from the image
|
||||
virtual bool isEyedropper() const { return false; }
|
||||
|
||||
// Returns true if this ink is shading
|
||||
virtual bool isShading() const { return false; }
|
||||
|
||||
// Returns true if this ink moves the scroll only
|
||||
virtual bool isScrollMovement() const { return false; }
|
||||
|
||||
|
@ -118,6 +118,7 @@ public:
|
||||
Ink* clone() override { return new ShadingInk(*this); }
|
||||
|
||||
bool isPaint() const override { return true; }
|
||||
bool isShading() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
m_proc = ink_processing[INK_SHADING][MID(0, loop->sprite()->pixelFormat(), 2)];
|
||||
|
@ -126,7 +126,8 @@ void BrushPreview::show(const gfx::Point& screenPos)
|
||||
(// Use cursor bounds for inks that are effects (eraser, blur, etc.)
|
||||
(ink->isEffect()) ||
|
||||
// or when the brush color is transparent and we are not in the background layer
|
||||
(layer && !layer->isBackground() &&
|
||||
(!ink->isShading() &&
|
||||
(layer && !layer->isBackground()) &&
|
||||
((sprite->pixelFormat() == IMAGE_INDEXED && brush_color == mask_index) ||
|
||||
(sprite->pixelFormat() == IMAGE_RGB && rgba_geta(brush_color) == 0) ||
|
||||
(sprite->pixelFormat() == IMAGE_GRAYSCALE && graya_geta(brush_color) == 0))))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user