mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-07 10:21:30 +00:00
Merge branch 'master'
This commit is contained in:
commit
9c42a7b31b
@ -51,6 +51,9 @@ namespace app {
|
|||||||
// Returns true if this ink picks colors from the image
|
// Returns true if this ink picks colors from the image
|
||||||
virtual bool isEyedropper() const { return false; }
|
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
|
// Returns true if this ink moves the scroll only
|
||||||
virtual bool isScrollMovement() const { return false; }
|
virtual bool isScrollMovement() const { return false; }
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ public:
|
|||||||
Ink* clone() override { return new ShadingInk(*this); }
|
Ink* clone() override { return new ShadingInk(*this); }
|
||||||
|
|
||||||
bool isPaint() const override { return true; }
|
bool isPaint() const override { return true; }
|
||||||
|
bool isShading() const override { return true; }
|
||||||
|
|
||||||
void prepareInk(ToolLoop* loop) override {
|
void prepareInk(ToolLoop* loop) override {
|
||||||
m_proc = ink_processing[INK_SHADING][MID(0, loop->sprite()->pixelFormat(), 2)];
|
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.)
|
(// Use cursor bounds for inks that are effects (eraser, blur, etc.)
|
||||||
(ink->isEffect()) ||
|
(ink->isEffect()) ||
|
||||||
// or when the brush color is transparent and we are not in the background layer
|
// 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_INDEXED && brush_color == mask_index) ||
|
||||||
(sprite->pixelFormat() == IMAGE_RGB && rgba_geta(brush_color) == 0) ||
|
(sprite->pixelFormat() == IMAGE_RGB && rgba_geta(brush_color) == 0) ||
|
||||||
(sprite->pixelFormat() == IMAGE_GRAYSCALE && graya_geta(brush_color) == 0))))) {
|
(sprite->pixelFormat() == IMAGE_GRAYSCALE && graya_geta(brush_color) == 0))))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user