Re: nsIDOMCanvasRenderingContext2d embedding in 1.9.2 ?

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 11/8/10 8:40 AM, [email protected] wrote:
> NS_ASSERTION(!docShell ^ !mCanvasElement, "Cannot set both docshell and
> canvas element");
>
> Where am I going wrong here? Should there be some additional prior
> initialization of the context? both docShell and mCanvasElement are null.

A 2d rendering context requires either a docshell or a canvas element, 
but not both, to operate properly.  So you must either call 
SetCanvasElement or InitializeWithSurface.

If you do neither, then the 2d context doesn't actually have anywhere to 
draw to.

-Boris
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.