本文整理汇总了Java中sun.awt.SunHints.INTVAL_INTERPOLATION_BICUBIC属性的典型用法代码示例。如果您正苦于以下问题:Java SunHints.INTVAL_INTERPOLATION_BICUBIC属性的具体用法?Java SunHints.INTVAL_INTERPOLATION_BICUBIC怎么用?Java SunHints.INTVAL_INTERPOLATION_BICUBIC使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.awt.SunHints
的用法示例。
在下文中一共展示了SunHints.INTVAL_INTERPOLATION_BICUBIC属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeHints
RenderingHints makeHints(Map hints) {
RenderingHints model = new RenderingHints(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;
}
示例2: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintCategory The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return new Integer(lcdTextContrast);
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
}
return null;
}
示例3: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintCategory The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return new Integer(lcdTextContrast);
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
case SunHints.INTKEY_RESOLUTION_VARIANT:
return SunHints.Value.get(SunHints.INTKEY_RESOLUTION_VARIANT,
resolutionVariantHint);
}
return null;
}
示例4: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintKey The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return lcdTextContrast;
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
case SunHints.INTKEY_RESOLUTION_VARIANT:
return SunHints.Value.get(SunHints.INTKEY_RESOLUTION_VARIANT,
resolutionVariantHint);
}
return null;
}
示例5: makeHints
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;
}