From 83b2038de1cf2b96891d3c9540948cfd55742a88 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 25 May 2020 12:30:53 -0300 Subject: [PATCH] Remove PaintInk::Type::AlphaCompositing introduced in 1509699a46b4f1d658d6ead4c38c7dd35b10b608 "Simple" and "Alpha Compositing" user inks will still use the internal "PaintInk::Type::Simple" type that is then converted to "TransparentInkProcessing" when opacity < 255 (alpha compositing case). --- src/app/tools/active_tool.cpp | 2 +- src/app/tools/inks.h | 5 ++--- src/app/tools/tool_box.cpp | 2 -- src/app/tools/tool_box.h | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/tools/active_tool.cpp b/src/app/tools/active_tool.cpp index 594b46cb3..4a5aa7bbf 100644 --- a/src/app/tools/active_tool.cpp +++ b/src/app/tools/active_tool.cpp @@ -104,7 +104,7 @@ Ink* ActiveToolManager::adjustToolInkDependingOnSelectedInkType( id = tools::WellKnownInks::PaintCopy; break; case tools::InkType::ALPHA_COMPOSITING: - id = tools::WellKnownInks::PaintAlphaCompositing; + id = tools::WellKnownInks::Paint; break; case tools::InkType::COPY_COLOR: id = tools::WellKnownInks::PaintCopy; diff --git a/src/app/tools/inks.h b/src/app/tools/inks.h index 9410cda0a..2c842aaf1 100644 --- a/src/app/tools/inks.h +++ b/src/app/tools/inks.h @@ -66,7 +66,7 @@ private: // (or foreground/background colors) class PaintInk : public BaseInk { public: - enum Type { Simple, WithFg, WithBg, AlphaCompositing, Copy, LockAlpha}; + enum Type { Simple, WithFg, WithBg, Copy, LockAlpha}; private: Type m_type; @@ -114,8 +114,7 @@ public: } else { switch (m_type) { - case Simple: - case AlphaCompositing: { + case Simple: { bool opaque = false; // Opacity is set to 255 when InkType=Simple in ToolLoopBase() diff --git a/src/app/tools/tool_box.cpp b/src/app/tools/tool_box.cpp index d6fc8abbb..d01167234 100644 --- a/src/app/tools/tool_box.cpp +++ b/src/app/tools/tool_box.cpp @@ -56,7 +56,6 @@ const char* WellKnownInks::Selection = "selection"; const char* WellKnownInks::Paint = "paint"; const char* WellKnownInks::PaintFg = "paint_fg"; const char* WellKnownInks::PaintBg = "paint_bg"; -const char* WellKnownInks::PaintAlphaCompositing = "paint_alpha_compositing"; const char* WellKnownInks::PaintCopy = "paint_copy"; const char* WellKnownInks::PaintLockAlpha = "paint_lock_alpha"; const char* WellKnownInks::Shading = "shading"; @@ -116,7 +115,6 @@ ToolBox::ToolBox() m_inks[WellKnownInks::Paint] = new PaintInk(PaintInk::Simple); m_inks[WellKnownInks::PaintFg] = new PaintInk(PaintInk::WithFg); m_inks[WellKnownInks::PaintBg] = new PaintInk(PaintInk::WithBg); - m_inks[WellKnownInks::PaintAlphaCompositing] = new PaintInk(PaintInk::AlphaCompositing); m_inks[WellKnownInks::PaintCopy] = new PaintInk(PaintInk::Copy); m_inks[WellKnownInks::PaintLockAlpha] = new PaintInk(PaintInk::LockAlpha); m_inks[WellKnownInks::Gradient] = new GradientInk(); diff --git a/src/app/tools/tool_box.h b/src/app/tools/tool_box.h index 0514c73fa..3f9897a5e 100644 --- a/src/app/tools/tool_box.h +++ b/src/app/tools/tool_box.h @@ -36,7 +36,6 @@ namespace app { extern const char* Paint; extern const char* PaintFg; extern const char* PaintBg; - extern const char* PaintAlphaCompositing; extern const char* PaintCopy; extern const char* PaintLockAlpha; extern const char* Shading;