Lines Matching defs:bitmap

101 	BBitmap* bitmap = fNormalBitmap;
104 bitmap = fDisabledBitmap;
117 if (bitmap && bitmap->IsValid()) {
118 if (bitmap->ColorSpace() == B_RGBA32
119 || bitmap->ColorSpace() == B_RGBA32_BIG) {
124 - bitmap->Bounds().Width()) / 2.0 + 0.5);
126 - bitmap->Bounds().Height()) / 2.0 + 0.5);
127 DrawBitmap(bitmap, BPoint(x, y));
314 BBitmap bitmap(bitmapRect, B_BITMAP_NO_SERVER_LINK, B_RGBA32);
315 status = bitmap.InitCheck();
319 size, &bitmap);
322 return SetIcon(&bitmap);
337 // try to load bitmap from either relative or absolute path
381 BIconButton::SetIcon(const BBitmap* bitmap, uint32 flags)
383 if (bitmap && bitmap->ColorSpace() == B_CMAP8) {
384 status_t status = bitmap->InitCheck();
386 if (BBitmap* rgb32Bitmap = _ConvertToRGB32(bitmap)) {
394 return _MakeBitmaps(bitmap);
409 if (BBitmap* bitmap = _ConvertToRGB32(mimeBitmap)) {
410 status = _MakeBitmaps(bitmap);
411 delete bitmap;
413 printf("BIconButton::SetIcon() - B_RGB32 bitmap is not "
421 printf("BIconButton::SetIcon() - B_CMAP8 bitmap is not valid\n");
449 BBitmap* bitmap = new(std::nothrow) BBitmap(
451 if (bitmap && bitmap->IsValid()) {
452 if (bitmap->Lock()) {
453 BView* helper = new BView(bitmap->Bounds(), "helper",
455 bitmap->AddChild(helper);
461 bitmap->Unlock();
463 status = _MakeBitmaps(bitmap);
465 printf("BIconButton::SetIcon() - B_RGB32 bitmap is not "
468 delete bitmap;
492 printf("BIconButton::SetIcon() - error allocating bitmap: "
585 BBitmap* bitmap = NULL;
587 bitmap = new(std::nothrow) BBitmap(fNormalBitmap);
588 if (bitmap != NULL && bitmap->IsValid()) {
591 uint8* bits = (uint8*)bitmap->Bits();
592 uint32 bpr = bitmap->BytesPerRow();
593 uint32 width = bitmap->Bounds().IntegerWidth() + 1;
594 uint32 height = bitmap->Bounds().IntegerHeight() + 1;
595 color_space format = bitmap->ColorSpace();
614 delete bitmap;
615 bitmap = NULL;
618 return bitmap;
662 BIconButton::_ConvertToRGB32(const BBitmap* bitmap) const
664 BBitmap* convertedBitmap = new(std::nothrow) BBitmap(bitmap->Bounds(),
669 BView* helper = new BView(bitmap->Bounds(), "helper",
673 helper->DrawBitmap(bitmap, BPoint(0.0, 0.0));
686 BIconButton::_MakeBitmaps(const BBitmap* bitmap)
688 status_t status = bitmap ? bitmap->InitCheck() : B_BAD_VALUE;
690 // make our own versions of the bitmap
691 BRect b(bitmap->Bounds());
693 color_space format = bitmap->ColorSpace();
699 // copy bitmaps from file bitmap
704 uint8* fBits = (uint8*)bitmap->Bits();
706 int32 fbpr = bitmap->BytesPerRow();
795 printf("BIconButton::_MakeBitmaps() - bitmap has unsupported "
807 printf("BIconButton::_MakeBitmaps() - bitmap is not valid\n");