Hello.

I noticed that anti aliased horizontal and vertical lines are 
not drawn properly. I've described the results (with pictures)
here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=509

In the patch, I try shifting line coordinates by half a pixel as 
soon as they're passed into Renderer.java:lineTo, and it seems to
fix it.

However, this seems a bit too easy, so if anyone can think of any
ways in which this fix breaks something, please let me know.

Thank you,
Denis.
exporting patch:
# HG changeset patch
# User Denis Lila <dl...@redhat.com>
# Date 1276894582 14400
# Node ID 69032d725302bc9fa243e6e7ccc843577472b2ff
# Parent  be909a137c8ee9faf46de0c1812d68828ee0522b
509 fix.

diff --git a/src/share/classes/sun/java2d/pisces/Renderer.java b/src/share/classes/sun/java2d/pisces/Renderer.java
--- a/src/share/classes/sun/java2d/pisces/Renderer.java
+++ b/src/share/classes/sun/java2d/pisces/Renderer.java
@@ -174,6 +174,8 @@
             this.x0 = x1;
             return;
         }
+        x1 += 32768;
+        y1 += 32768;
 
         int orientation = (y0 < y1) ? 1 : -1;
         if (lastOrientation == 0) {

Reply via email to