Lines Matching defs:bitmap

83 	BBitmap* bitmap = fNormalBitmap;
84 // adjust colors and bitmap according to flags
96 bitmap = fDisabledBitmap;
104 bitmap = fClickedBitmap;
109 bitmap = fDisabledClickedBitmap;
129 // bitmap
131 if (bitmap && bitmap->IsValid()) {
132 float x = floorf((width - bitmap->Bounds().Width()) / 2.0 + 0.5);
133 float y = floorf((height - bitmap->Bounds().Height()) / 2.0 + 0.5);
137 if (bitmap->ColorSpace() == B_RGBA32 || bitmap->ColorSpace() == B_RGBA32_BIG) {
142 DrawBitmap(bitmap, point);
146 region.Exclude(bitmap->Bounds().OffsetByCopy(point));
321 // try to load bitmap from either relative or absolute path
358 IconButton::SetIcon(const BBitmap* bitmap)
360 if (bitmap && bitmap->ColorSpace() == B_CMAP8) {
361 status_t status = bitmap->InitCheck();
363 if (BBitmap* rgb32Bitmap = _ConvertToRGB32(bitmap)) {
371 return _MakeBitmaps(bitmap);
384 if (BBitmap* bitmap = _ConvertToRGB32(mimeBitmap)) {
385 status = _MakeBitmaps(bitmap);
386 delete bitmap;
388 printf("IconButton::SetIcon() - B_RGB32 bitmap is not valid\n");
392 printf("IconButton::SetIcon() - B_CMAP8 bitmap is not valid\n");
414 BBitmap* bitmap = new(nothrow) BBitmap(quickResBitmap->Bounds(), B_RGB32, true);
415 if (bitmap && bitmap->IsValid()) {
416 BView* helper = new BView(bitmap->Bounds(), "helper",
418 if (bitmap->Lock()) {
419 bitmap->AddChild(helper);
425 bitmap->Unlock();
427 status = _MakeBitmaps(bitmap);
429 printf("IconButton::SetIcon() - B_RGB32 bitmap is not valid\n");
430 delete bitmap;
453 printf("IconButton::SetIcon() - error allocating bitmap: %s\n", strerror(status));
471 BBitmap* bitmap = NULL;
473 bitmap = new(nothrow) BBitmap(fNormalBitmap);
474 if (bitmap->IsValid()) {
476 uint8* bits = (uint8*)bitmap->Bits();
477 uint32 bpr = bitmap->BytesPerRow();
478 uint32 width = bitmap->Bounds().IntegerWidth() + 1;
479 uint32 height = bitmap->Bounds().IntegerHeight() + 1;
480 color_space format = bitmap->ColorSpace();
498 delete bitmap;
499 bitmap = NULL;
502 return bitmap;
578 IconButton::_ConvertToRGB32(const BBitmap* bitmap) const
580 BBitmap* convertedBitmap = new(nothrow) BBitmap(bitmap->Bounds(), B_BITMAP_ACCEPTS_VIEWS, B_RGBA32);
583 BView* helper = new BView(bitmap->Bounds(), "helper",
588 helper->DrawBitmap(bitmap, BPoint(0.0, 0.0));
601 IconButton::_MakeBitmaps(const BBitmap* bitmap)
603 status_t status = bitmap ? bitmap->InitCheck() : B_BAD_VALUE;
605 // make our own versions of the bitmap
606 BRect b(bitmap->Bounds());
608 color_space format = bitmap->ColorSpace();
614 // copy bitmaps from file bitmap
619 uint8* fBits = (uint8*)bitmap->Bits();
621 int32 fbpr = bitmap->BytesPerRow();
700 printf("IconButton::_MakeBitmaps() - bitmap has unsupported colorspace\n");
710 printf("IconButton::_MakeBitmaps() - bitmap is not valid\n");