[whatwg] <canvas> shadow compositing oddities

Oliver Hunt oliver at apple.com
Tue Jul 29 04:31:01 PDT 2008


On Jul 29, 2008, at 3:56 AM, Oliver Hunt wrote:

>
> On Jul 27, 2008, at 12:06 PM, Eric Butler wrote:
>
>> It would seem Safari isn't quite following the spec here, since it  
>> appears to never draw shadows when the shadow color is fully  
>> transparent or something and doesn't encounter these issues. I'm  
>> not sure that should be the correct behavior since transparent  
>> shadows can have an effect, but I do think there should be some way  
>> to explicitly disable shadows, since there is no shadow color/ 
>> offset that can be set such that shadows will have no effect on any  
>> of the composite operators.
>
> By default the shadowBlur is 0, which the spec states should not  
> draw anything -- so that should act as an explicit mechanism for  
> disabling shadows should it not?  It's possible i've missed  
> something, but this would appear to accomplish what you desire afaict.
Philip Taylor has corrected my obvious mistake (eg. drawing a non- 
opaque object or with non 0,0 shadow offsets)

We could special case opacity 0, with 0,0 offset, and 0 blur radius as  
being a "do not draw shadow" flag perhaps?

>
>
>> -Eric Butler
>
> --Oliver Hunt




More information about the whatwg mailing list