CanvasGraphics2D and gradient fills bug

A discussion forum for JFreeSVG (a fast, lightweight, SVG generator for the Java platform).
Post Reply
Posts: 1
Joined: Wed Aug 06, 2014 11:03 pm
antibot: No, of course not.

CanvasGraphics2D and gradient fills bug

Post by darrenw » Wed Aug 06, 2014 11:15 pm

Just been playing with JFreeSVG with JFreeChart and gradient fills for Meter Charts and notice that when we use the CanvasGraphics2D the fill expands beyond the circle.

This is pretty easy to replicate by creating a background gradient fill for the dial chart as follows:

Code: Select all

GradientPaint gp = new GradientPaint(new Point(),
new Color(255, 255, 102), new Point(),
new Color(255, 128, 0));
DialBackground db = new DialBackground(gp);
db.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
regards Darren

Post Reply