eirikbakke commented on a change in pull request #3116:
URL: https://github.com/apache/netbeans/pull/3116#discussion_r691503067



##########
File path: 
ide/csl.api/src/org/netbeans/modules/csl/editor/completion/MethodParamsTipPaintComponent.java
##########
@@ -51,20 +51,8 @@ public MethodParamsTipPaintComponent(List<List<String>> 
params, int idx, JTextCo
     }
     
     public @Override void paint(Graphics g) {
-        Object value = (Map) 
(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints")); 
//NOI18N
-        Map renderingHints = (value instanceof Map) ? (java.util.Map) value : 
null;
-        if (renderingHints != null && g instanceof Graphics2D) {
-            Graphics2D g2d = (Graphics2D) g;
-            RenderingHints oldHints = g2d.getRenderingHints();
-            g2d.setRenderingHints(renderingHints);
-            try {
-                super.paint(g2d);
-            } finally {
-                g2d.setRenderingHints(oldHints);
-            }
-        } else {
-            super.paint(g);
-        }
+        GraphicsUtils.configureRenderingHints(g);
+        super.paint(g);

Review comment:
       I also added the "put(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON)" hint, which enables anti-aliasing for 
non-text things such as diagonal lines and curves. Some existing sites did this 
already (presumably the ones that actually needed it).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to