Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendering HTML into CGBitmapContextRef



Thanks Scott.

I thought of that. But the part of the code that wants to do the rendering is already based on Quartz and is suppose to be cross platform... I want to avoid too much Cocoa.

Also, it seems to be a potential speed hit: html -> WebView -> pdf -> BitmapContext -> image.

But, I'm also worried that the HTML Rendering Library might be out of date.

Mark


On 20-May-05, at 14:25, Scott Thompson wrote:


On May 20, 2005, at 1:06 PM, Mark Morrill wrote:

Hi all,

I've looked and I've come up with nothing... yet. Often, the answer will appear after posting to a list :) For example, after starting writing this post, I found "HTML Rendering Library". This looks like it will let me render into a offscreen gworld but, I'd rather skip that step.

What I want to do is to take a bit of html and render it into a CGBitmapContextRef (or CGContextRef for that matter.)

Am I stuck working with HTML Rendering Library?

Your best best is probably to use a WebView. All NSViews implement dataWithPDFInsideRect: which can return a PDF document for whatever is drawn in that view. You could then draw that PDF into your BitmapContextRef.


Scott


_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartz-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden
References: 
 >Rendering HTML into CGBitmapContextRef (From: Mark Morrill <email@hidden>)
 >Re: Rendering HTML into CGBitmapContextRef (From: Scott Thompson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.