Remove PaintInk::Type::AlphaCompositing introduced in 1509699a46

"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).
This commit is contained in:
David Capello 2020-05-25 12:30:53 -03:00
parent f5f8664732
commit 83b2038de1
4 changed files with 3 additions and 7 deletions

View File

@ -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;

View File

@ -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()

View File

@ -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();

View File

@ -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;