本文整理汇总了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;
}
}