Offscreen drawing again ...
Offscreen drawing again ...
- Subject: Offscreen drawing again ...
- From: Manfred Lippert <email@hidden>
- Date: Fri, 08 Feb 2002 00:50:32 +0100
Hi,
not much feedback on my questions, but I try it again ... ;-)
In the meanwhile I figured pretty much out how to draw "offscreen" as I need
it.
I create an NSBitmapImageRep and fill it with "hand-made" bitmap data (in
RGBA format).
I create an NSImage and add the NSBitmapImageRep to it.
Then I "lockFocus" this NSImage and draw an NSAttributedString.
After that I can draw my NSImage in any View and I can see a great
"compositing" of my original bitmap data and the drawn string.
Great!
But I have a last problem: I have to find a way to get the bitmap data
_back_!
Does anyone know how to get bitmap data out of an NSImage?
My original bitmap data (without the overdrawn NSAttributedString) is
untouched. I think this must have to do something with the caching of the
NSImage ... The result of combining the original bitmap data and the string
data seems to be only in the "offscreen window" of the NSCachedRep that
NSImage internally uses.
How can I get the bitmap data of the "result" of NSImage?
One more thing: I need it in RGBA-Format ...
Any ideas?
Any CoreGraphic calls? E.g. getting the NSChachedRep and then getting the
Offscreen-Window and then ... ?
Regards,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.