[Cairo] Gradients
Keith Packard
keithp at keithp.com
Sun Oct 5 19:06:39 PDT 2003
Around 18 o'clock on Oct 5, Thomas Hunger wrote:
> Do you want to compose the gradient with trapezoids (and use some kind of
> parameter to control the smoothness of the gradient? The smoother the more
> trapezoids used)?
Looking at the PostScript spec leads me to believe that there is a lot
about gradients that I don't understand, and that for some reason
trapezoids aren't sufficient to represent this information.
> There is no color member in the XTrapezoid structure but I saw a
> #define X_RenderColorTrapezoids 14
> in the XRender extension header?
Yeah, I was originally thinking that we'd do simple Gouraud shading by
setting the colors at each vertex of a trapezoid. However, that's really
inconsistent with the rest of the system as the shaded texture should
really be the source input into the regular Render operation. In
particular, doing shading this way makes it impossible to shade text.
Instead, the shading should obviously be an implicit source operand, so we
need a specification that matches this model.
-keith
More information about the cairo
mailing list