예제 #1
0
 /**
  * Set desktop hints (not supported by all platforms).
  *
  * @param g graphics reference
  */
 public static void hints(final Graphics g) {
   if (HINTS != null && hints) {
     try {
       ((Graphics2D) g).addRenderingHints(HINTS);
     } catch (final Exception ex) {
       Util.stack(ex);
       hints = false;
     }
   }
 }
예제 #2
0
 /**
  * Activates graphics anti-aliasing.
  *
  * @param g graphics reference
  * @return graphics reference
  */
 public static Graphics2D antiAlias(final Graphics g) {
   final Graphics2D g2 = (Graphics2D) g;
   g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
   return g2;
 }