* Added 24-bit mode support.
* This fixes bug #2182. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25272 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
|
* Copyright 2002-2008, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Updated by Sikosis ([email protected])
|
* Updated by Sikosis ([email protected])
|
||||||
@@ -1777,9 +1777,12 @@ TOSMagnify::TOSMagnify(BRect r, TMagnify* parent, color_space space)
|
|||||||
case B_RGB15_BIG:
|
case B_RGB15_BIG:
|
||||||
case B_RGBA15_BIG:
|
case B_RGBA15_BIG:
|
||||||
case B_RGB16:
|
case B_RGB16:
|
||||||
case B_RGB16_BIG:
|
case B_RGB16_BIG:
|
||||||
fBytesPerPixel = 2;
|
fBytesPerPixel = 2;
|
||||||
break;
|
break;
|
||||||
|
case B_RGB24:
|
||||||
|
fBytesPerPixel = 3;
|
||||||
|
break;
|
||||||
case B_RGB32:
|
case B_RGB32:
|
||||||
case B_RGBA32:
|
case B_RGBA32:
|
||||||
case B_RGB32_BIG:
|
case B_RGB32_BIG:
|
||||||
@@ -1829,18 +1832,16 @@ TOSMagnify::InitObject()
|
|||||||
fOldBits = (char*)malloc(fBitmap->BitsLength());
|
fOldBits = (char*)malloc(fBitmap->BitsLength());
|
||||||
|
|
||||||
if (!fPixel) {
|
if (!fPixel) {
|
||||||
#if B_HOST_IS_BENDIAN
|
#if B_HOST_IS_BENDIAN
|
||||||
#define native B_RGBA32_BIG
|
fPixel = new BBitmap(BRect(0,0,0,0), B_RGBA32_BIG, true);
|
||||||
#else
|
#else
|
||||||
#define native B_RGBA32_LITTLE
|
fPixel = new BBitmap(BRect(0,0,0,0), B_RGBA32, true);
|
||||||
#endif
|
#endif
|
||||||
fPixel = new BBitmap(BRect(0,0,0,0), native, true);
|
fPixelView = new BView(BRect(0,0,0,0), NULL, 0, 0);
|
||||||
#undef native
|
|
||||||
fPixelView = new BView(BRect(0,0,0,0),NULL,0,0);
|
|
||||||
fPixel->Lock();
|
fPixel->Lock();
|
||||||
fPixel->AddChild(fPixelView);
|
fPixel->AddChild(fPixelView);
|
||||||
fPixel->Unlock();
|
fPixel->Unlock();
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user