|
From: Vinnie <th...@ya...> - 2009-04-28 14:10:15
|
I'm doing shaped gradient fills on rounded rectangles. A shaped gradient fill is one where the gradient colors take on the shape of the enclosing object. So for a rectangle it would be a series of rectangles. For an ellipse, a series of ellipses. Unlike the agg demo, my gradient fills are always "stretch to fit". The origin and scale factors are calculated to precisely fit the enclosing shape (polygon, round rect, rect, ellipse, or arc). The problem is that I am currently using: typedef agg::gradient_diamond gfunc_type; This works great for shape blended rectangles but doesn't work for rounded rectangles. Is there an existing gradient function I can use to get rounded rectangle blends? Or what is the "right" formula? |