public final float[] getPositions() { if(gv == null) return null; if(positions == null) positions = gv.getGlyphPositions(0,length,null); return positions; } //}}}
@Override public float[] getGlyphPositions(int arg0, int arg1, float[] arg2) { return this.vec.getGlyphPositions(arg0, arg1, arg2); }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, String text) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = awtFont.createGlyphVector( graphics.getFontRenderContext(), text); float[] result = vector.getGlyphPositions(0, text.length() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, String text) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = awtFont.createGlyphVector( graphics.getFontRenderContext(), text); float[] result = vector.getGlyphPositions(0, text.length() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, String text) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = awtFont.createGlyphVector( graphics.getFontRenderContext(), text); float[] result = vector.getGlyphPositions(0, text.length() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
/** * This method gets glyph positions for purposes of selecting text. WE are not too worried about selecting text * at this point so we just use the first font available. */ public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, String text) { Object aaHint = null; Object fracHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFonts().get(0); if (awtFont.getSize() > threshold ) { aaHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } fracHint = graphics.getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS); graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fractionalFontMetricsHint); GlyphVector vector = awtFont.createGlyphVector( graphics.getFontRenderContext(), text); float[] result = vector.getGlyphPositions(0, text.length() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, aaHint ); } graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fracHint); return result; }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector(); float[] result = vector.getGlyphPositions(0, vector.getNumGlyphs() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector(); float[] result = vector.getGlyphPositions(0, vector.getNumGlyphs() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFont(); if (awtFont.getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector(); float[] result = vector.getGlyphPositions(0, vector.getNumGlyphs() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } return result; }
/** * This method gets glyph positions for purposes of selecting text. WE are not too worried about selecting text * at this point so we just use the first font available. */ @Override public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector) { Object aaHint = null; Object fracHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); Font awtFont = ((AWTFSFont)font).getAWTFonts().get(0); if (awtFont.getSize() > threshold ) { aaHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } fracHint = graphics.getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS); graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fractionalFontMetricsHint); GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector(); float[] result = vector.getGlyphPositions(0, vector.getNumGlyphs() + 1, null); if (awtFont.getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, aaHint ); } graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fracHint); return result; }