本文整理汇总了Java中java.awt.RenderingHints.putAll方法的典型用法代码示例。如果您正苦于以下问题:Java RenderingHints.putAll方法的具体用法?Java RenderingHints.putAll怎么用?Java RenderingHints.putAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.RenderingHints
的用法示例。
在下文中一共展示了RenderingHints.putAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeHints
import java.awt.RenderingHints; //导入方法依赖的package包/类
RenderingHints makeHints(Map<?,?> hints) {
RenderingHints model = new RenderingHints(null);
if (hints != null) {
model.putAll(hints);
}
model.put(SunHints.KEY_RENDERING,
SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint));
model.put(SunHints.KEY_ANTIALIASING,
SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint));
model.put(SunHints.KEY_TEXT_ANTIALIASING,
SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint));
model.put(SunHints.KEY_FRACTIONALMETRICS,
SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint));
model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST,
Integer.valueOf(lcdTextContrast));
Object value;
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
value = SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
break;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
value = SunHints.VALUE_INTERPOLATION_BILINEAR;
break;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
value = SunHints.VALUE_INTERPOLATION_BICUBIC;
break;
default:
value = null;
break;
}
if (value != null) {
model.put(SunHints.KEY_INTERPOLATION, value);
}
model.put(SunHints.KEY_STROKE_CONTROL,
SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint));
return model;
}