[cairo] Under-specified gradients (was: cairo pattern/glitz patches)

David Reveman davidr at novell.com
Sun Feb 27 15:27:45 PST 2005


On Fri, 2005-02-25 at 16:23 -0500, Carl Worth wrote: 
> On Fri, 25 Feb 2005 14:13:52 -0500, Carl Worth wrote:
> > Here's a patch that achieves that behavior, (and the more general
> > approach of also padding the nearest color stop out to 0.0 and
> > 1.0). If I apply this before cairo-gstate-pattern-copy-show-1.diff
> > then the single-color-stop-gradient regressions go away.
> 
> I've now committed my patch, and most of cairo-gstate-pattern-copy-show-1.diff.
> 
> The only part I didn't commit is in the attached patch, for which I
> just had a couple of very minor questions.
> 
> The call to cairo_surface_set_matrix is unnecessary, isn't it?

It should be completely unnecessary when backend function 'set_matrix'
is removed as it only makes sure that the backend matrix is consistent
after it has been set it with cairo_surface_set_matrix. 

> 
> The line:
> 
> 	pattern.filter = surface->filter
> 
> is the line that makes the results of cairo_gstate_show_surface shift
> by 0.5 - 1.0 pixels when using libsvg-cairo. That might just indicate
> some inconsistent defaults somewhere, so I'm not too concerned about
> it.

Seems like some tiny translation have sneaked in there somehow and
without
pattern.filter = surface->filter
you're getting nearest filter and wont see it.

-David




More information about the cairo mailing list