Re: SVG/Canvas DrawImage Issue

I think it would make sense if the width and height passed into the  
drawImage call were used as the svg viewport, and if they are not  
specified then yes, making the svg viewport equal to the canvas  
width/height sounds reasonable to me.

Any clarifications should go into the html5/canvas spec though.

Cheers
/Erik


On Tue, 20 Jul 2010 19:58:33 +0200, Jeff Schiller <codedread@gmail.com>  
wrote:

> Awesome!  Can't wait to have drawImage(mySvgImage) in <canvas> :)
>
> Opens the door to automating SVG test cases too - use canvas pixel
> operations to check the rendered results of a SVG file.  Of course that
> requires all browsers to support this :/
>
> Intuitively, I guess I would have thought it was percentage of the  
> <canvas>
> element's dimensions.
>
> Whatever the decision might be, it looks like an update to
> http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#images will be
> required.
>
> Jeff
>
> On Tue, Jul 20, 2010 at 6:51 AM, Patrick Dengler <patd@microsoft.com>  
> wrote:
>
>>  From the canvas spec, drawImage states that drawImage should draw based
>> on the intrinsic dimensions of an image.
>>
>>
>>
>> We need clarification on what to do if the intrinsic dimensions of the
>> source are percentage based.
>>
>>
>>
>> Webkit establishes the size the based on window size when you loaded it.
>> When you resize the window, you get different results on the Canvas.
>>
>>
>>
>> Thoughts/Clarifications are welcomed.
>>


-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Tuesday, 20 July 2010 19:57:48 UTC