Java Code Examples for sun.awt.SunHints#INTKEY_FRACTIONALMETRICS
The following examples show how to use
sun.awt.SunHints#INTKEY_FRACTIONALMETRICS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SunGraphics2D.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example 2
Source File: SunGraphics2D.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example 3
Source File: SunGraphics2D.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 4
Source File: SunGraphics2D.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 5
Source File: SunGraphics2D.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 6
Source File: SunGraphics2D.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 7
Source File: SunGraphics2D.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 8
Source File: SunGraphics2D.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * 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; }
Example 9
Source File: SunGraphics2D.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 10
Source File: SunGraphics2D.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 11
Source File: SunGraphics2D.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 12
Source File: SunGraphics2D.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 13
Source File: SunGraphics2D.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * 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; }
Example 14
Source File: SunGraphics2D.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
/** * 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; }