本文整理匯總了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;
}