当前位置: 首页>>代码示例>>Java>>正文


Java SunHints.INTKEY_ANTIALIASING属性代码示例

本文整理汇总了Java中sun.awt.SunHints.INTKEY_ANTIALIASING属性的典型用法代码示例。如果您正苦于以下问题:Java SunHints.INTKEY_ANTIALIASING属性的具体用法?Java SunHints.INTKEY_ANTIALIASING怎么用?Java SunHints.INTKEY_ANTIALIASING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sun.awt.SunHints的用法示例。


在下文中一共展示了SunHints.INTKEY_ANTIALIASING属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:47,代码来源:SunGraphics2D.java

示例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);
    case SunHints.INTKEY_RESOLUTION_VARIANT:
        return SunHints.Value.get(SunHints.INTKEY_RESOLUTION_VARIANT,
                                  resolutionVariantHint);
    }
    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:50,代码来源:SunGraphics2D.java

示例3: 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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:50,代码来源:SunGraphics2D.java


注:本文中的sun.awt.SunHints.INTKEY_ANTIALIASING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。