B_COLOR_8_BIT is deprecated
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17166 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4827dbe47a
commit
c228b1689c
@ -68,23 +68,23 @@ dummy_label:
|
|||||||
|
|
||||||
for (loop = 0; loop <= 8; loop++) {
|
for (loop = 0; loop <= 8; loop++) {
|
||||||
if ((picH = rsrcs.FindResource('PICT', loop+4, &len))) {
|
if ((picH = rsrcs.FindResource('PICT', loop+4, &len))) {
|
||||||
fClockFace[loop] = new BBitmap(theRect, B_COLOR_8_BIT);
|
fClockFace[loop] = new BBitmap(theRect, B_CMAP8);
|
||||||
fClockFace[loop]->SetBits(picH,len,0,B_COLOR_8_BIT);
|
fClockFace[loop]->SetBits(picH,len,0, B_CMAP8);
|
||||||
free(picH);
|
free(picH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
theRect.Set(0,0,15,15);
|
theRect.Set(0,0,15,15);
|
||||||
if ((picH = rsrcs.FindResource('MICN', "center", &len))) {
|
if ((picH = rsrcs.FindResource('MICN', "center", &len))) {
|
||||||
fCenter = new BBitmap(theRect, B_COLOR_8_BIT);
|
fCenter = new BBitmap(theRect, B_CMAP8);
|
||||||
fCenter->SetBits(picH,len,0,B_COLOR_8_BIT);
|
fCenter->SetBits(picH,len,0, B_CMAP8);
|
||||||
free(picH);
|
free(picH);
|
||||||
}
|
}
|
||||||
|
|
||||||
theRect.Set(0,0,2,2);
|
theRect.Set(0,0,2,2);
|
||||||
if ((picH = rsrcs.FindResource('PICT', 13, &len))) {
|
if ((picH = rsrcs.FindResource('PICT', 13, &len))) {
|
||||||
fInner = new BBitmap(theRect, B_COLOR_8_BIT);
|
fInner = new BBitmap(theRect, B_CMAP8);
|
||||||
fInner->SetBits(picH,len,0,B_COLOR_8_BIT);
|
fInner->SetBits(picH,len,0, B_CMAP8);
|
||||||
free(picH);
|
free(picH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ TOnscreenView::InitObject(BRect rect, short mRadius, short hRadius,
|
|||||||
fOffscreen = NULL;
|
fOffscreen = NULL;
|
||||||
|
|
||||||
fOffscreenView = new TOffscreenView(rect, "freqd",mRadius,hRadius, offset, face, show);
|
fOffscreenView = new TOffscreenView(rect, "freqd",mRadius,hRadius, offset, face, show);
|
||||||
fOffscreen = new BBitmap(rect, B_COLOR_8_BIT, true);
|
fOffscreen = new BBitmap(rect, B_CMAP8, true);
|
||||||
if (fOffscreen != NULL && fOffscreen->Lock()) {
|
if (fOffscreen != NULL && fOffscreen->Lock()) {
|
||||||
fOffscreen->AddChild(fOffscreenView);
|
fOffscreen->AddChild(fOffscreenView);
|
||||||
fOffscreen->Unlock();
|
fOffscreen->Unlock();
|
||||||
|
@ -1723,7 +1723,7 @@ TOSMagnify::TOSMagnify(BRect r, TMagnify* parent, color_space space)
|
|||||||
fColorSpace(space), fParent(parent)
|
fColorSpace(space), fParent(parent)
|
||||||
{
|
{
|
||||||
switch (space) {
|
switch (space) {
|
||||||
case B_COLOR_8_BIT:
|
case B_CMAP8:
|
||||||
fBytesPerPixel = 1;
|
fBytesPerPixel = 1;
|
||||||
break;
|
break;
|
||||||
case B_RGB15:
|
case B_RGB15:
|
||||||
|
@ -106,12 +106,12 @@ TPeopleApp::TPeopleApp(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
BBitmap largeIcon(BRect(0, 0, B_LARGE_ICON - 1, B_LARGE_ICON - 1), B_COLOR_8_BIT);
|
BBitmap largeIcon(BRect(0, 0, B_LARGE_ICON - 1, B_LARGE_ICON - 1), B_CMAP8);
|
||||||
BBitmap miniIcon(BRect(0, 0, B_MINI_ICON - 1, B_MINI_ICON - 1), B_COLOR_8_BIT);
|
BBitmap miniIcon(BRect(0, 0, B_MINI_ICON - 1, B_MINI_ICON - 1), B_CMAP8);
|
||||||
|
|
||||||
mime.Install();
|
mime.Install();
|
||||||
largeIcon.SetBits(kLargePersonIcon, largeIcon.BitsLength(), 0, B_COLOR_8_BIT);
|
largeIcon.SetBits(kLargePersonIcon, largeIcon.BitsLength(), 0, B_CMAP8);
|
||||||
miniIcon.SetBits(kSmallPersonIcon, miniIcon.BitsLength(), 0, B_COLOR_8_BIT);
|
miniIcon.SetBits(kSmallPersonIcon, miniIcon.BitsLength(), 0, B_CMAP8);
|
||||||
mime.SetShortDescription("Person");
|
mime.SetShortDescription("Person");
|
||||||
mime.SetLongDescription("Contact information for a person.");
|
mime.SetLongDescription("Contact information for a person.");
|
||||||
mime.SetIcon(&largeIcon, B_LARGE_ICON);
|
mime.SetIcon(&largeIcon, B_LARGE_ICON);
|
||||||
|
@ -132,7 +132,7 @@ NormalPulseView::DetermineVendorAndProcessor()
|
|||||||
|
|
||||||
// Initialize logo
|
// Initialize logo
|
||||||
|
|
||||||
fCpuLogo = new BBitmap(BRect(0, 0, 63, 62), B_COLOR_8_BIT);
|
fCpuLogo = new BBitmap(BRect(0, 0, 63, 62), B_CMAP8);
|
||||||
unsigned char *logo = BlankLogo;
|
unsigned char *logo = BlankLogo;
|
||||||
|
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
@ -151,7 +151,7 @@ NormalPulseView::DetermineVendorAndProcessor()
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fCpuLogo->SetBits(logo, fCpuLogo->BitsLength(), 0, B_COLOR_8_BIT);
|
fCpuLogo->SetBits(logo, fCpuLogo->BitsLength(), 0, B_CMAP8);
|
||||||
fHasBrandLogo = (logo != BlankLogo);
|
fHasBrandLogo = (logo != BlankLogo);
|
||||||
|
|
||||||
get_cpu_type(fVendor, sizeof(fVendor), fProcessor, sizeof(fProcessor));
|
get_cpu_type(fVendor, sizeof(fVendor), fProcessor, sizeof(fProcessor));
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
DrawButton::DrawButton(BRect frame, const char *name, const unsigned char *on, const unsigned char *off,
|
DrawButton::DrawButton(BRect frame, const char *name, const unsigned char *on, const unsigned char *off,
|
||||||
BMessage *msg, int32 resize, int32 flags)
|
BMessage *msg, int32 resize, int32 flags)
|
||||||
: BControl(frame, name, "", msg, resize, flags | B_WILL_DRAW),
|
: BControl(frame, name, "", msg, resize, flags | B_WILL_DRAW),
|
||||||
fOn(frame, B_COLOR_8_BIT),
|
fOn(frame, B_CMAP8),
|
||||||
fOff(frame, B_COLOR_8_BIT),
|
fOff(frame, B_CMAP8),
|
||||||
fButtonState(false)
|
fButtonState(false)
|
||||||
{
|
{
|
||||||
fOff.SetBits(off, (frame.Width() + 1) * (frame.Height() + 1), 0, B_COLOR_8_BIT);
|
fOff.SetBits(off, (frame.Width() + 1) * (frame.Height() + 1), 0, B_CMAP8);
|
||||||
fOn.SetBits(on, (frame.Width() + 1) * (frame.Height() + 1), 0, B_COLOR_8_BIT);
|
fOn.SetBits(on, (frame.Width() + 1) * (frame.Height() + 1), 0, B_CMAP8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ operator!=(const rgb_color &a, const rgb_color &b)
|
|||||||
void
|
void
|
||||||
ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to)
|
ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to)
|
||||||
{
|
{
|
||||||
ASSERT(bitmap->ColorSpace() == B_COLOR_8_BIT); // other color spaces not implemented yet
|
ASSERT(bitmap->ColorSpace() == B_CMAP8); // other color spaces not implemented yet
|
||||||
|
|
||||||
BScreen screen(B_MAIN_SCREEN_ID);
|
BScreen screen(B_MAIN_SCREEN_ID);
|
||||||
uint32 fromIndex = screen.IndexForColor(from);
|
uint32 fromIndex = screen.IndexForColor(from);
|
||||||
@ -64,7 +64,7 @@ ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to)
|
|||||||
void
|
void
|
||||||
ReplaceTransparentColor(BBitmap *bitmap, rgb_color with)
|
ReplaceTransparentColor(BBitmap *bitmap, rgb_color with)
|
||||||
{
|
{
|
||||||
ASSERT(bitmap->ColorSpace() == B_COLOR_8_BIT); // other color spaces not implemented yet
|
ASSERT(bitmap->ColorSpace() == B_CMAP8); // other color spaces not implemented yet
|
||||||
|
|
||||||
BScreen screen(B_MAIN_SCREEN_ID);
|
BScreen screen(B_MAIN_SCREEN_ID);
|
||||||
uint8 withIndex = screen.IndexForColor(with);
|
uint8 withIndex = screen.IndexForColor(with);
|
||||||
|
@ -300,9 +300,9 @@ TransportButton::BitsForMask(uint32 mask) const
|
|||||||
BBitmap *
|
BBitmap *
|
||||||
TransportButton::MakeBitmap(uint32 mask)
|
TransportButton::MakeBitmap(uint32 mask)
|
||||||
{
|
{
|
||||||
BBitmap *result = new BBitmap(Bounds(), B_COLOR_8_BIT);
|
BBitmap *result = new BBitmap(Bounds(), B_CMAP8);
|
||||||
result->SetBits(BitsForMask(mask), (Bounds().Width() + 1) * (Bounds().Height() + 1),
|
result->SetBits(BitsForMask(mask), (Bounds().Width() + 1) * (Bounds().Height() + 1),
|
||||||
0, B_COLOR_8_BIT);
|
0, B_CMAP8);
|
||||||
|
|
||||||
ReplaceTransparentColor(result, Parent()->ViewColor());
|
ReplaceTransparentColor(result, Parent()->ViewColor());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user