[whatwg] question about canvas globalCompositeOperation
silviapfeiffer1 at gmail.com
Sat Aug 21 00:54:45 PDT 2010
I've tried to work with the globalCompositeOperation  over the last days
for a particular use case where I am trying to use a gradient to merge with
a canvas as a mask. I now wonder if the globalCompositeOperation is indeed
meant to be used this way and what transparency means.
For example, "source-in" is defined as:
"A in B": Display the source image wherever both the source image and
destination image are opaque. Display transparency elsewhere.
What about partial transparency? I would expect the use of the canvas bitmap
B as a mask for the object or image A, where A becomes partially transparent
where-ever B is partially transparent. As it stands, browsers do not
implement it this way - only completely transparent pixels will create
transparency in A, which means when using a gradient that nothing become
partially transparent - it's either there or gone.
Should partial transparency in B not be dealt with as partial transparency
in the resulting display, too?
Apologies if this has been dealt with before. I'm looking at it with video
as the input medium, i.e. through drawImage(), trying to make it partially
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg