Re: FxBitmap draw to NSGraphicsContext in FxPlug
Re: FxBitmap draw to NSGraphicsContext in FxPlug
- Subject: Re: FxBitmap draw to NSGraphicsContext in FxPlug
- From: Paul Schneider <email@hidden>
- Date: Thu, 24 Feb 2011 08:35:26 -0600
Hi Rainer,
The _graphicsContextForFxBitmap: method in the ScrollingRichText example shows how to create a CGBitmapContext out of an FxBitmap. From there you can use the CGBitmapContextCreateImage() function to create a CGImage from the contents of the bitmap context.
In the future, we hope to provide more examples showing how to translate between FxPlug image types and various OS image types.
Here are some OS documentation links that might be helpful:
http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CGBitmapContext/Reference/reference.html
http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html
http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CocoaDrawingGuide/Images/Images.html
On Feb 23, 2011, at 11:19 PM, Rainer Standke wrote:
> Hello,
>
> I am trying to draw an FXBitmap to an NSGraphicsContext. I am trying to adapt the ScrollingRichText Example so that it shows the background image in the background. I guess I need a CGImage. So, how can I turn the FxBitmap into a CGImage?
>
> Thanks,
>
> Rainer _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Pro-apps-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden