W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] SVG extensions to <canvas>

From: Oliver Hunt <oliver@apple.com>
Date: Wed, 6 May 2009 13:16:50 -0700
Message-ID: <5B2BF325-619E-45F0-95D9-FCCF947C39C8@apple.com>
>> SVG images often don't have an intrinsic size. What's the intrinsic  
>> size of
>> this image?
>> <svg xmlns="http://www.w3.org/2000/svg">
>>   <linearGradient id="g" x1="0" y1="0" x2="1" y2="0">
>>     <stop stop-color="red" offset="0"/><stop stop-color="lime"  
>> offset="1"/>
>>   </linearGradient>
>>   <rect x="0%" y="0%" width="100%" height="100%" fill="url(#g)"/>
>> </svg>
> That <svg> hasn't got intrinsic sizes, so it cannot be rendered on a
> canvas. This doesn't preclude the use of <svg> with intrinsic sizes,
> that are given only by width/height attributes on <svg>.

That's really really bad, as that means sometimes drawing you svg will  
work, and sometimes it won't.  That's why it's a bad API.

Received on Wednesday, 6 May 2009 13:16:50 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC