[ 
https://issues.apache.org/jira/browse/PIVOT-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910164#action_12910164
 ] 

Greg Brown edited comment on PIVOT-633 at 9/16/10 10:47 AM:
------------------------------------------------------------

Oh, by the way - I also tried swapping out the implementation of drawRect() 
with one that uses Rectangle2D and it didn't resolve the rounding issue. 
Depending on scale, a one-pixel wide gap may sometimes appear regardless of 
whether AA is on or off. The fact that Rectangle2D appeared to solve the 
problem in the other cases must have been a red herring. So this may simply be 
a rounding issue in Java2D itself that we have to live with.


      was (Author: gbrown):
    Oh, by the way - I also tried swapping out the implementation of drawRect() 
with one that uses Rectangle2D and it didn't resolve the rounding issue. 
Depending on scale, a one-pixel wide gap may sometimes appear regardless of 
whether AA is on or off. So this may simply be a rounding issue in Java2D 
itself that we have to live with.

  
> Eliminate use of GraphicsUtilities.drawRect() and drawLine()
> ------------------------------------------------------------
>
>                 Key: PIVOT-633
>                 URL: https://issues.apache.org/jira/browse/PIVOT-633
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Greg Brown
>            Priority: Minor
>
> These methods were originally created to provide better rendering behavior 
> than the corresponding java.awt.Graphics#drawRect() and drawLine() classes. 
> However, a better approach is to call Graphics2D#draw() with a Rectangle2D or 
> a Line2D. This produces much better results when the display is scaled, since 
> these primitives use true floating point values.
> A number of components including most buttons have already been updated to 
> use the java.awt.geom classes, but many skins are still using 
> GraphicsUtilities and should also be updated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to