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

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

Note that, in order to use the geom primitives effectively, the current stroke 
must be taken into account. For example, rather than drawing a rectangle with a 
stroke thickness of 1 at 0, 0, it should be drawn at 0.5, 0.5 with a width and 
height of one less than the actual bounds.


> 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