|
From: Lorne L. <lo...@in...> - 2009-04-28 14:21:39
|
Do a search for "gradient" and "contour" in this mailing list, someone posted some code to do contour gradients which might be what you're looking for. (It wasn't terribly fast, though.) Lorne Laliberte Senior Software Developer, Indigo Rose Software On Tue, Apr 28, 2009 at 8:43 AM, Vinnie <th...@ya...> wrote: > > 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? > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Vector-agg-general mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vector-agg-general > |