Open GoogleCodeExporter opened 9 years ago
Printing has been improved since version 1.2.1. Could you try with the new
version
1.3 release and let us know?
http://code.google.com/p/piccolo2d/downloads/list?can=2&q=%221.3+binary%22&colsp
ec=Filename+Summary+Uploaded+Size+DownloadCount
Original comment by heue...@gmail.com
on 3 Apr 2010 at 6:16
Ah sorry that I didn't try that in first place, with the 1.3 maven dependency i
get the same error/behavior
Original comment by HenningS...@gmail.com
on 3 Apr 2010 at 8:22
I'm thinking this is caused by a rounding error. Even if you take printing out
of the
equation, just zooming into the PPath causes it to jitter considerably. The blue
square on the other hand seems quite stable.
Internally PPath uses Java2D's Floating point precision shapes, so this kind of
makes
sense.
I don't think this is a printing bug as much as it is a request for higher
precision
graphics primitives?
Any one else agree?
Original comment by allain.lalonde
on 4 Apr 2010 at 1:21
Original comment by heue...@gmail.com
on 27 Aug 2010 at 4:17
I can get this bad behavior on Mac OS + straight up Java2D without Piccolo2D at
play. Even if I use double-precision Path2D objects. (See attached file--I'm
roughly mimicking the Java2D calls that Piccolo2D issues in the PiccoloPrintBug
example above.)
On Windows, the red path draws at the same position as the blue fill. On Mac
OS, the path and fill diverge increasingly for smaller and smaller scaling
values:
final Rectangle2D rect = new Rectangle2D.Double(0, 0, 200, 200);
final AffineTransform xform = new AffineTransform(0.001, 0, 0, 0.001, 0, 0);
// use the same path to fill and stroke -- still, they diverge
Path2D.Double path = new Path2D.Double();
path.append(rect, false);
// transform for printing
g2.transform(xform);
// draw the path -- stroke size doesn't seem to matter, use 1
g2.setStroke(new BasicStroke(1f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
g2.setColor(Color.red);
g2.draw(path);
// draw the rectangle
g2.setColor(Color.blue);
g2.fill(path);
I conclude that this is a Mac OS Java issue with drawing paths to a print
Graphics at small scale. I'm thinking there's much we can do about it, but take
a look at my example and comment.
Original comment by atdi...@gmail.com
on 1 Mar 2011 at 4:53
Attachments:
Original issue reported on code.google.com by
HenningS...@gmail.com
on 3 Apr 2010 at 3:02Attachments: