[cairo] Premultiplied transparency causes streaks in images
paril at alteredsoftworks.com
Fri Nov 12 18:16:06 PST 2010
I appreciate the responses, but I just couldn't deal with the API any
I moved over to a game-based engine called Gorgon, which is based upon
Direct3D/Direct2D. It works very well for blitting transparency onto the
surfaces, and it runs INCREDIBLY fast due to hardware acceleration.
Unfortunately, SlimDX is a pain in the ass to distribute, but it's the best
option I got! It also works solely on floating point values for one of these
Again, thanks you guys, Andrea, for taking the time to respond and try to
solve my issue.
On Fri, Nov 12, 2010 at 5:57 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> I don't think there is any way around having to use another buffer for the
> brush stroke.
> However using MIN (or MAX if the brush is 0 in the transparent areas and 1
> where opaque) would be a way to create this buffer from an antialiased or
> partially-transparent brush at the same resolution as the final image. There
> is no need for the super-sampling I suggested.
> M Joonas Pihlaja wrote:
>> On Fri, 12 Nov 2010, Bill Spitzak wrote:
>> The real solution is to somehow figure out the exact antialiasing of the
>>> entire brush stroke. I think modern programs just do this by making a
>>> bigger "stroke buffer" where the a much larger aliased brush draws
>> If you could composite the brush using MIN() on the alpha component,
>> then you could generate a mask that preserves the antialiasing
>> reasonably but afaict, there's no easy way to do this using pure cairo
>> calls. Andrea Canciani suggested using the new DARKEN operator to
>> create a greyscale version of the mask (implements MIN() on the colour
>> components, but sadly not alpha) and then converting that to an A8
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo