On Jan 20, 2011, at 6:02 AM, Daan Nusman wrote:

> Hello everyone,
> 
> Is it possible to use the WebKit(2) API to render directly to a memory bitmap 
> or texture?
> 
> I've already built the WinCairo port. It works nicely in a window 
> (WinLauncher), very cool! However, I'd like to render to a fixed bitmap, 
> without any window to embed WebKit in (somewhat like a console application). 
> Is this possible without a huge effort?
> 
> Options:
> - hack the COM object?
> - create a completely new platform layer/port?
> - am I completely missing a convenient WebKit2 API call? :)
> - modify/use the print functionality?
> 
> [Some context: I would like to start using WebKit for creating reports, from 
> inside our full-screen DirectX9-based simulator (Windows-based). It just 
> works like any other DX9 full-screen game, and has its own UI toolkit. To 
> integrate a simple static report, generated from HTML, into our UI, we need 
> to render the HTML to a texture so we can use that to show the report. 
> Nothing interactive required, and no networking required. I'm a newcomer to 
> WebKit so any pointers are greatly appreciated.]

Both WebKit and WebKit2 are very reliant on having an actual HWND. The HWND is 
used to determine the size of the viewport, whether the page is focused, etc. I 
don't think there's an easy way to render content without an HWND currently. 
However, you can hide the HWND (either by moving it offscreen or never making 
it visible) and capture its contents using WM_PRINT.

-Adam

_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to