Re: nsIDOMCanvasRenderingContext2d embedding in 1.9.2 ?

Benjamin Smedberg <[email protected]>
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 11/8/10 8:40 AM, [email protected] wrote:
> I'm extending my MozMFC example to handle rendering into a Win32 bitmap. I
> start with the following ...
>
> nsCOMPtr<nsICanvasRenderingContextInternal> context;
> context =
> do_CreateInstance("@mozilla.org/content/canvas-rendering-context;1?id=2d",
> &rv);

This really doesn't make any sense. The way to get a canvas rendering 
context is to create a <canvas> element and then call .getContext('2d') on 
it. Otherwise your rendering context isn't actually backed by a drawing buffer.

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.