flag for using a solid version of a DrawingMode, currently only B_OP_COPY actually has an implementation

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11112 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-01-28 21:45:59 +00:00
parent 597841da50
commit 884e8bc6b5
2 changed files with 10 additions and 3 deletions

View File

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

View File

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