Lines Matching defs:bitmap

111 compose_checker_background(const BBitmap* bitmap)
113 BBitmap* result = new (nothrow) BBitmap(bitmap);
354 BBitmap* bitmap;
356 if (message->FindPointer("bitmap", (void**)&bitmap) != B_OK
357 || message->FindRef("ref", &ref) != B_OK || bitmap == NULL)
363 status_t status = SetImage(&ref, bitmap, bitmapOwner);
374 ShowImageView::SetImage(const entry_ref* ref, BBitmap* bitmap,
382 fBitmap = bitmap;
390 // prepare the display bitmap
438 fMimeType = "image/x-be-bitmap";
560 // the width/height of the bitmap (in pixels)
564 // the available width/height for layouting the bitmap (in pixels)
582 // the width/height of the bitmap (in pixels)
586 // the available width/height for layouting the bitmap (in pixels)
597 // update the bitmap size after the zoom
601 // always align in the center if the bitmap is smaller than the window
754 BBitmap* bitmap = new(nothrow) BBitmap(rect, hasAlpha ? B_RGBA32
756 if (bitmap == NULL || !bitmap->IsValid()) {
757 delete bitmap;
761 if (bitmap->Lock()) {
762 bitmap->AddChild(&view);
791 bitmap->RemoveChild(&view);
792 bitmap->Unlock();
795 return bitmap;
800 ShowImageView::_AddSupportedTypes(BMessage* msg, BBitmap* bitmap)
817 BBitmapStream stream(bitmap);
826 else if (strcmp(formats[j].MIME, "image/x-be-bitmap") != 0) {
837 stream.DetachBitmap(&bitmap);
852 BBitmap* bitmap = _CopySelection(128, false);
853 if (bitmap == NULL)
865 if (_AddSupportedTypes(&drag, bitmap)) {
868 // avoid flickering of dragged bitmap caused by drawing into the window
870 // only use a transparent bitmap on selections less than 400x400
878 // DragMessage takes ownership of bitmap
879 DragMessage(&drag, bitmap, B_OP_ALPHA, sourcePoint);
880 bitmap = NULL;
882 delete bitmap;
894 ShowImageView::_OutputFormatForType(BBitmap* bitmap, const char* type,
903 BBitmapStream stream(bitmap);
922 stream.DetachBitmap(&bitmap);
932 ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
935 if (bitmap == NULL) {
936 // If no bitmap is supplied, write out the whole image
937 bitmap = fBitmap;
940 BBitmapStream stream(bitmap);
971 stream.DetachBitmap(&bitmap);
972 // Don't allow the bitmap to be deleted, this is
973 // especially important when using fBitmap as the bitmap
978 ShowImageView::_SendInMessage(BMessage* msg, BBitmap* bitmap,
982 BBitmapStream stream(bitmap); // destructor deletes bitmap
1005 BBitmap* bitmap = _CopySelection();
1006 if (bitmap == NULL)
1010 if (!_OutputFormatForType(bitmap, type.String(), &format)) {
1011 delete bitmap;
1017 SaveToFile(&dir, name.String(), bitmap, &format);
1018 delete bitmap;
1020 _SendInMessage(msg, bitmap, &format);
1022 delete bitmap;
1071 BBitmap* bitmap = new(nothrow) BBitmap(fBitmap->Bounds(),
1073 if (bitmap == NULL || !bitmap->IsValid()) {
1074 delete bitmap;
1078 if (bitmap->Lock()) {
1079 bitmap->AddChild(&view);
1087 bitmap->RemoveChild(&view);
1088 bitmap->Unlock();
1091 fBitmap = bitmap;
1095 delete bitmap;
1539 BBitmap* bitmap = _CopySelection();
1540 if (bitmap != NULL) {
1542 bitmap->Archive(&bitmapArchive);
1543 // NOTE: Possibly "image/x-be-bitmap" is more correct.
1546 data->AddMessage("image/bitmap", &bitmapArchive);
1549 delete bitmap;
1690 // set new bitmap
1780 // scale bitmap to thumbnail size