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:
parent
597841da50
commit
884e8bc6b5
@ -9,6 +9,7 @@
|
|||||||
#include "DrawingModeAlphaPO.h"
|
#include "DrawingModeAlphaPO.h"
|
||||||
#include "DrawingModeBlend.h"
|
#include "DrawingModeBlend.h"
|
||||||
#include "DrawingModeCopy.h"
|
#include "DrawingModeCopy.h"
|
||||||
|
#include "DrawingModeCopySolid.h"
|
||||||
#include "DrawingModeErase.h"
|
#include "DrawingModeErase.h"
|
||||||
#include "DrawingModeInvert.h"
|
#include "DrawingModeInvert.h"
|
||||||
#include "DrawingModeMax.h"
|
#include "DrawingModeMax.h"
|
||||||
@ -23,7 +24,8 @@
|
|||||||
agg::DrawingMode*
|
agg::DrawingMode*
|
||||||
DrawingModeFactory::DrawingModeFor(drawing_mode mode,
|
DrawingModeFactory::DrawingModeFor(drawing_mode mode,
|
||||||
source_alpha alphaSrcMode,
|
source_alpha alphaSrcMode,
|
||||||
alpha_function alphaFncMode)
|
alpha_function alphaFncMode,
|
||||||
|
bool solid)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
// these drawing modes discard source pixels
|
// these drawing modes discard source pixels
|
||||||
@ -44,7 +46,11 @@ DrawingModeFactory::DrawingModeFor(drawing_mode mode,
|
|||||||
// in these drawing modes, the current high
|
// in these drawing modes, the current high
|
||||||
// and low color are treated equally
|
// and low color are treated equally
|
||||||
case B_OP_COPY:
|
case B_OP_COPY:
|
||||||
return new agg::DrawingModeBGRA32Copy();
|
if (solid) {
|
||||||
|
printf("DrawingModeBGRA32CopySolid()\n");
|
||||||
|
return new agg::DrawingModeBGRA32CopySolid();
|
||||||
|
} else
|
||||||
|
return new agg::DrawingModeBGRA32Copy();
|
||||||
break;
|
break;
|
||||||
case B_OP_ADD:
|
case B_OP_ADD:
|
||||||
return new agg::DrawingModeBGRA32Add();
|
return new agg::DrawingModeBGRA32Add();
|
||||||
|
@ -14,7 +14,8 @@ class DrawingModeFactory {
|
|||||||
|
|
||||||
static agg::DrawingMode* DrawingModeFor(drawing_mode mode,
|
static agg::DrawingMode* DrawingModeFor(drawing_mode mode,
|
||||||
source_alpha alphaSrcMode,
|
source_alpha alphaSrcMode,
|
||||||
alpha_function alphaFncMode);
|
alpha_function alphaFncMode,
|
||||||
|
bool solid = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DRAWING_MODE_FACTORY_H
|
#endif // DRAWING_MODE_FACTORY_H
|
||||||
|
Loading…
Reference in New Issue
Block a user