[cairo] Quartz gradients consistency

Andrea Canciani ranma42 at gmail.com
Sun Oct 10 06:47:47 PDT 2010


On Sun, Oct 10, 2010 at 2:48 PM, Andrea Canciani <ranma42 at gmail.com> wrote:
> After some discussion with Robert O'Callahan and Benjamin Otte, I've written
> down a solutions to fix quartz gradients that should not break Mozilla nor GTK.
>
> Moreover it should make gradients consistent between all the operations
> (paint, fill, stroke, show_glyphs and (NYI, but soon) mask) and independent
> of clip and path extents.

Gradients used in mask operations should now be consistent as well.

>
> For "new" surfaces the gradient extents are the surface extents, but for
> surfaces created with a relation to another surface (cairo_push/pop_group,
> cairo_surface_create_similar) it makes the gradient extents be the same
> as the ones of the original surface (and keeps this consistency even when
> the surfaces are "moved" with cairo_surface_set_device_offset).
> This means that both clip+draw and push+draw+pop should work as expected.
>
> Any suggestions on how the attached patch could be improved?

New attachment, fixing mask and making sure that gradients extents are
big enough.

Again, external review and testing is appreciated (expecially because the
previous patch was failing in a *very* stupid way, but cairo test suite didn't
regress).

Andrea
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-quartz-Improve-gradient-consistency.patch
Type: application/octet-stream
Size: 14199 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20101010/eeb4cffa/attachment-0001.obj>


More information about the cairo mailing list