Closed Bug 294234 Opened 19 years ago Closed 14 years ago

[BEOS] Add a nsIImageBeOS.h interface

Categories

(Core Graveyard :: GFX: BeOS, enhancement)

x86
BeOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: thesuckiestemail, Assigned: thesuckiestemail)

References

Details

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.8b2) Gecko/20050514 Firefox/1.0+ Build Identifier: If we want to drag bitmaps we'd need to get a BBitmap from a nsIImage which is included in the transferable ("application/x-moz-nativeimage"). So by adding a interface nsIImageBeOS we could get a cloned bitmap thru a GetBitmap() method. Reproducible: Always
Attached file Suggested interface (obsolete) (deleted) —
Attached patch Work in progress implementation (obsolete) (deleted) — Splinter Review
The GetBitmap code is not right, but it shows how I'd want it.
Assignee: beos → thesuckiestemail
Status: NEW → ASSIGNED
Do we really need to have interface for native pixelmap format cloning? There are two methods using mozilla's own image format there - smt, like GetBits and GetAlphaBits. also method to get info about pixlempa parameters and method to draw that at give surface in given context. How other platforms sort this task out?
I havn't managed to find a better way to do it. All I want is a BBitmap from an nsIImage, so feel free to suggest a better approach. That BBitmap would be passed to 'BView::DragMessage(msg, bitmap, ...)'
Stupid me. it should be a BBitmap ** so I can return the pointer to the new bitmap.
Attached file Updated interface (deleted) —
We should use BBitmap **
Attachment #183628 - Attachment is obsolete: true
Attached patch Working GetBitmap (deleted) — Splinter Review
I'll ask for review later if I find dragging bitmaps useful...
Attachment #183629 - Attachment is obsolete: true
Do we need cloning at all for DnD implementation? As you are using native pixelmap, you will use at some point BView::DrawBitmap() anyway. And for that we need only pointer. Not BBitmap clone. Or do you think that working with clone is more safe?
I just thought it's safer. Anyway as bitmaps seems to not have the right aaliasing it doesn't look as nice as I'd hoped. So maybe we should just skip bitmaps while dragging. Text doesn't even have a native image in the transferable.
It looks like for safer version you should have BBitmap belonging to dragger or consumer class instance, while even in cloning case it belongs to nsImage instance. But it don't matter if you decided to not implement that
Dunno why wrote antialiasing, in my previous post, I meant alpha-channel. Maybe it could be written safer, but I'm leaving that up to someone else. I think I'll use this version for the first version of drag'n'drop. So if I make my dnd-code cleanup it will probably be dependant on this (image dragging is kind of cool).
Comment on attachment 183633 [details] Updated interface mistakenly marked as a patch
Attachment #183633 - Attachment is patch: false
Blocks: 266252
Blocks: 104729
No longer blocks: 266252
Product: Core → Core Graveyard
We don't support BeOS any more.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
In the graveyard, code referred to doesn't exist to be fixed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: