diff --git a/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.cpp b/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.cpp index 433020d859..77b96dcf75 100644 --- a/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.cpp +++ b/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.cpp @@ -9,6 +9,7 @@ #include "DrawingModeAlphaPO.h" #include "DrawingModeBlend.h" #include "DrawingModeCopy.h" +#include "DrawingModeCopySolid.h" #include "DrawingModeErase.h" #include "DrawingModeInvert.h" #include "DrawingModeMax.h" @@ -23,7 +24,8 @@ agg::DrawingMode* DrawingModeFactory::DrawingModeFor(drawing_mode mode, source_alpha alphaSrcMode, - alpha_function alphaFncMode) + alpha_function alphaFncMode, + bool solid) { switch (mode) { // these drawing modes discard source pixels @@ -44,7 +46,11 @@ DrawingModeFactory::DrawingModeFor(drawing_mode mode, // in these drawing modes, the current high // and low color are treated equally case B_OP_COPY: - return new agg::DrawingModeBGRA32Copy(); + if (solid) { +printf("DrawingModeBGRA32CopySolid()\n"); + return new agg::DrawingModeBGRA32CopySolid(); + } else + return new agg::DrawingModeBGRA32Copy(); break; case B_OP_ADD: return new agg::DrawingModeBGRA32Add(); diff --git a/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.h b/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.h index 392d6ab1b7..370739eecc 100644 --- a/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.h +++ b/src/servers/app/server/Painter/drawing_modes/DrawingModeFactory.h @@ -14,7 +14,8 @@ class DrawingModeFactory { static agg::DrawingMode* DrawingModeFor(drawing_mode mode, source_alpha alphaSrcMode, - alpha_function alphaFncMode); + alpha_function alphaFncMode, + bool solid = false); }; #endif // DRAWING_MODE_FACTORY_H