本文整理匯總了Java中java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF屬性的典型用法代碼示例。如果您正苦於以下問題:Java RenderingHints.VALUE_TEXT_ANTIALIAS_OFF屬性的具體用法?Java RenderingHints.VALUE_TEXT_ANTIALIAS_OFF怎麽用?Java RenderingHints.VALUE_TEXT_ANTIALIAS_OFF使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類java.awt.RenderingHints
的用法示例。
在下文中一共展示了RenderingHints.VALUE_TEXT_ANTIALIAS_OFF屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
public static void main(String[] args) {
Object aahints[] = {RenderingHints.VALUE_TEXT_ANTIALIAS_OFF,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB};
int i, j, k;
AffineTransform a = new AffineTransform();
for (i=0; i<aahints.length; i++) {
for(j=0; j<8; j++) {
System.out.println("Testing hint "+i+" angle="+j);
a.setToRotation(j*Math.PI/4);
testTransformedFont(a, aahints[i]);
}
testFontOfSize(0.0f, aahints[i]);
testFontOfSize(-10.0f, aahints[i]);
}
}
示例2: isAAOnByDefault
public static boolean isAAOnByDefault() {
Map systemHints = (Map) Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints"); //NOI18N
if (systemHints != null) {
Object o = systemHints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
boolean result = o != null &&
o != RenderingHints.VALUE_TEXT_ANTIALIAS_OFF &&
o != RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT;
return result;
} else {
return false;
}
}