Allow creating a BitmapDrawingEngine with a specific colorspace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40000 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0f0bd984d7
commit
1c3680d302
@ -4,8 +4,9 @@
|
||||
#include <new>
|
||||
|
||||
|
||||
BitmapDrawingEngine::BitmapDrawingEngine()
|
||||
BitmapDrawingEngine::BitmapDrawingEngine(color_space colorSpace)
|
||||
: DrawingEngine(),
|
||||
fColorSpace(colorSpace),
|
||||
fHWInterface(NULL),
|
||||
fBitmap(NULL)
|
||||
{
|
||||
@ -62,7 +63,7 @@ BitmapDrawingEngine::SetSize(int32 newWidth, int32 newHeight)
|
||||
return B_OK;
|
||||
|
||||
fBitmap = new(std::nothrow) UtilityBitmap(BRect(0, 0, newWidth - 1,
|
||||
newHeight - 1), B_RGB32, 0);
|
||||
newHeight - 1), fColorSpace, 0);
|
||||
if (fBitmap == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
|
@ -9,7 +9,8 @@ class UtilityBitmap;
|
||||
|
||||
class BitmapDrawingEngine : public DrawingEngine {
|
||||
public:
|
||||
BitmapDrawingEngine();
|
||||
BitmapDrawingEngine(
|
||||
color_space colorSpace = B_RGB32);
|
||||
virtual ~BitmapDrawingEngine();
|
||||
|
||||
#if DEBUG
|
||||
@ -22,6 +23,7 @@ virtual ~BitmapDrawingEngine();
|
||||
color_space space);
|
||||
|
||||
private:
|
||||
color_space fColorSpace;
|
||||
BitmapHWInterface* fHWInterface;
|
||||
UtilityBitmap* fBitmap;
|
||||
BRegion fClipping;
|
||||
|
Loading…
Reference in New Issue
Block a user