Java Code Examples for java.awt.geom.AffineTransform#TYPE_FLIP
The following examples show how to use
java.awt.geom.AffineTransform#TYPE_FLIP .
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 Project: dragonwell8_jdk File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 2
Source Project: jdk8u60 File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 3
Source Project: openjdk-jdk8u File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 4
Source Project: openjdk-jdk8u-backup File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 5
Source Project: openjdk-jdk9 File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 6
Source Project: jdk8u-jdk File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 7
Source Project: jdk8u_jdk File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 8
Source Project: hottub File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 9
Source Project: openjdk-8-source File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 10
Source Project: openjdk-8 File: WPathGraphics.java License: GNU General Public License v2.0 | 5 votes |
@Override protected int platformFontCount(Font font, String str) { AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); fontTransform.concatenate(getFont().getTransform()); int transformType = fontTransform.getType(); /* Test if GDI can handle the transform */ boolean directToGDI = ((transformType != AffineTransform.TYPE_GENERAL_TRANSFORM) && ((transformType & AffineTransform.TYPE_FLIP) == 0)); if (!directToGDI) { return 0; } /* Since all windows fonts are available, and the JRE fonts * are also registered. Only the Font.createFont() case is presently * unknown to GDI. Those can be registered too, although that * code does not exist yet, it can be added too, so we should not * fail that case. Just do a quick check whether its a TrueTypeFont * - ie not a Type1 font etc, and let drawString() resolve the rest. */ Font2D font2D = FontUtilities.getFont2D(font); if (font2D instanceof CompositeFont || font2D instanceof TrueTypeFont) { return 1; } else { return 0; } }
Example 11
Source Project: dragonwell8_jdk File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 12
Source Project: TencentKona-8 File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 13
Source Project: jdk8u-jdk File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 14
Source Project: jdk8u60 File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 15
Source Project: openjdk-jdk8u File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 16
Source Project: sis File: AffineTransforms2DTest.java License: Apache License 2.0 | 4 votes |
/** * Gets the flip state using standard {@code AffineTransform} API. */ private static int getFlipFromType(final AffineTransform tr) { return (tr.getType() & AffineTransform.TYPE_FLIP) != 0 ? -1 : +1; }
Example 17
Source Project: Bytecoder File: SunGraphics2D.java License: Apache License 2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 18
Source Project: jdk8u-dev-jdk File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 19
Source Project: jdk8u-jdk File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }
Example 20
Source Project: openjdk-8-source File: SunGraphics2D.java License: GNU General Public License v2.0 | 4 votes |
protected void invalidateTransform() { int type = transform.getType(); int origTransformState = transformState; if (type == AffineTransform.TYPE_IDENTITY) { transformState = TRANSFORM_ISIDENT; transX = transY = 0; } else if (type == AffineTransform.TYPE_TRANSLATION) { double dtx = transform.getTranslateX(); double dty = transform.getTranslateY(); transX = (int) Math.floor(dtx + 0.5); transY = (int) Math.floor(dty + 0.5); if (dtx == transX && dty == transY) { transformState = TRANSFORM_INT_TRANSLATE; } else { transformState = TRANSFORM_ANY_TRANSLATE; } } else if ((type & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0) { transformState = TRANSFORM_TRANSLATESCALE; transX = transY = 0; } else { transformState = TRANSFORM_GENERIC; transX = transY = 0; } if (transformState >= TRANSFORM_TRANSLATESCALE || origTransformState >= TRANSFORM_TRANSLATESCALE) { /* Its only in this case that the previous or current transform * was more than a translate that font info is invalidated */ cachedFRC = null; this.validFontInfo = false; this.fontMetrics = null; this.glyphVectorFontInfo = null; if (transformState != origTransformState) { invalidatePipe(); } } if (strokeState != STROKE_CUSTOM) { validateBasicStroke((BasicStroke) stroke); } }