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>
|
#include <new>
|
||||||
|
|
||||||
|
|
||||||
BitmapDrawingEngine::BitmapDrawingEngine()
|
BitmapDrawingEngine::BitmapDrawingEngine(color_space colorSpace)
|
||||||
: DrawingEngine(),
|
: DrawingEngine(),
|
||||||
|
fColorSpace(colorSpace),
|
||||||
fHWInterface(NULL),
|
fHWInterface(NULL),
|
||||||
fBitmap(NULL)
|
fBitmap(NULL)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +63,7 @@ BitmapDrawingEngine::SetSize(int32 newWidth, int32 newHeight)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
fBitmap = new(std::nothrow) UtilityBitmap(BRect(0, 0, newWidth - 1,
|
fBitmap = new(std::nothrow) UtilityBitmap(BRect(0, 0, newWidth - 1,
|
||||||
newHeight - 1), B_RGB32, 0);
|
newHeight - 1), fColorSpace, 0);
|
||||||
if (fBitmap == NULL)
|
if (fBitmap == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ class UtilityBitmap;
|
||||||
|
|
||||||
class BitmapDrawingEngine : public DrawingEngine {
|
class BitmapDrawingEngine : public DrawingEngine {
|
||||||
public:
|
public:
|
||||||
BitmapDrawingEngine();
|
BitmapDrawingEngine(
|
||||||
|
color_space colorSpace = B_RGB32);
|
||||||
virtual ~BitmapDrawingEngine();
|
virtual ~BitmapDrawingEngine();
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -22,6 +23,7 @@ virtual ~BitmapDrawingEngine();
|
||||||
color_space space);
|
color_space space);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
color_space fColorSpace;
|
||||||
BitmapHWInterface* fHWInterface;
|
BitmapHWInterface* fHWInterface;
|
||||||
UtilityBitmap* fBitmap;
|
UtilityBitmap* fBitmap;
|
||||||
BRegion fClipping;
|
BRegion fClipping;
|
||||||
|
|
Loading…
Reference in New Issue