コード例 #1
0
 public void setRenderingHint(Key key, Object value) {
   if (RenderingHints.KEY_ANTIALIASING.equals(key)) {
     int antialias = SWT.DEFAULT;
     if (RenderingHints.VALUE_ANTIALIAS_OFF.equals(value)) {
       antialias = SWT.OFF;
     } else if (RenderingHints.VALUE_ANTIALIAS_ON.equals(value)) {
       antialias = SWT.ON;
     }
     _gc.setAntialias(antialias);
   }
 }
コード例 #2
0
 public Object getRenderingHint(Key key) {
   if (RenderingHints.KEY_ANTIALIASING.equals(key)) {
     switch (_gc.getAntialias()) {
       case SWT.DEFAULT:
         return RenderingHints.VALUE_ANTIALIAS_DEFAULT;
       case SWT.OFF:
         return RenderingHints.VALUE_ANTIALIAS_OFF;
       case SWT.ON:
         return RenderingHints.VALUE_ANTIALIAS_ON;
     }
   }
   return null;
 }