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

Greg Brown commented on PIVOT-633:
----------------------------------

Another thing that I don't like about GraphicsUtilities.drawRect() is the 
automatic antialiasing. It isn't documented in the Javadoc and incurs a 
performance penalty that the caller may not want or need. 

Also, in order to perform the anti-aliasing, the implementation creates a copy 
of the graphics context, which is more expensive than simply turning the AA key 
on and then off later. But that can pretty easily be fixed.



> 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
>             Fix For: 2.0
>
>
> 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