/** * Returns the position of the specified glyph within this GlyphVector. */ public Point2D getGlyphPosition(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphPosition(glyphIndex-off[idx]); }
/** * Returns the position of the specified glyph within this GlyphVector. */ public Point2D getGlyphPosition(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphPosition(glyphIndex-off[idx]); }
/** * Get the visual advance associated with the current glyph. * This is the distance from the location of the glyph to * the rightmost part of the glyph. */ protected float getCharWidth(int gvIdx) { Rectangle2D lcBound = gv.getGlyphVisualBounds(gvIdx).getBounds2D(); Point2D lcLoc = gv.getGlyphPosition(gvIdx); return (float)(lcBound.getX()+lcBound.getWidth()- lcLoc.getX()); } }
/** * Returns the position of the specified glyph within this GlyphVector. */ public Point2D getGlyphPosition(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphPosition(glyphIndex-off[idx]); }
/** * Get the visual advance associated with the current glyph. * This is the distance from the location of the glyph to * the rightmost part of the glyph. */ protected float getCharWidth(int gvIdx) { Rectangle2D lcBound = gv.getGlyphVisualBounds(gvIdx).getBounds2D(); Point2D lcLoc = gv.getGlyphPosition(gvIdx); return (float)(lcBound.getX()+lcBound.getWidth()- lcLoc.getX()); } }
/** * Get the visual advance associated with the current glyph. * This is the distance from the location of the glyph to * the rightmost part of the glyph. */ protected float getCharWidth(int gvIdx) { Rectangle2D lcBound = gv.getGlyphVisualBounds(gvIdx).getBounds2D(); Point2D lcLoc = gv.getGlyphPosition(gvIdx); return (float)(lcBound.getX()+lcBound.getWidth()- lcLoc.getX()); } }
protected Point2D getStartPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexStart)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexStart); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexStart); //glyph are defined starting at position (0,0) Point2D.Float result = new Point2D.Float(0, 0); if ( glyphTransform != null ) //apply the glyph transformation to the start point glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
protected Point2D getStartPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexStart)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexStart); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexStart); //glyph are defined starting at position (0,0) Point2D.Float result = new Point2D.Float(0, 0); if ( glyphTransform != null ) //apply the glyph transformation to the start point glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
protected Point2D getStartPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexStart)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexStart); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexStart); //glyph are defined starting at position (0,0) Point2D.Float result = new Point2D.Float(0, 0); if ( glyphTransform != null ) //apply the glyph transformation to the start point glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
@Override protected void doExplicitGlyphLayout() { GVTGlyphVector gv = this.gv; gv.performDefaultLayout(); int ng = gv.getNumGlyphs(); if (ng > 0) { this.advance = gv.getGlyphPosition(ng); } else { this.advance = new Point2D.Float(0, 0); } this.layoutApplied = true; }
float dy = 0f; Point2D[] newPositions = new Point2D[numGlyphs+1]; Point2D prevPos = gv.getGlyphPosition(0); int prevCode = gv.getGlyphCode(0); float x = (float) prevPos.getX(); = new Point2D.Double(advance.getX() - (gv.getGlyphPosition(numGlyphs-1).getX() - x), advance.getY() - (gv.getGlyphPosition(numGlyphs-1).getY() - y)); Point2D gpos = gv.getGlyphPosition(i); int currCode; currCode = (i == numGlyphs)?-1:gv.getGlyphCode(i); prevPos = gv.getGlyphPosition(0); x = (float) prevPos.getX(); y = (float) prevPos.getY(); Point2D gpos = gv.getGlyphPosition(i); dx = (float)gpos.getX()-(float)prevPos.getX(); dy = (float)gpos.getY()-(float)prevPos.getY(); gpos = gv.getGlyphPosition(i); gm = gv.getGlyphMetrics(i); Point2D gPos = gv.getGlyphPosition(numGlyphs); x += (float) (gPos.getX()-prevPos.getX()); y += (float) (gPos.getY()-prevPos.getY()); double advX = gv.getGlyphPosition(numGlyphs-1).getX()
protected Point2D getEndPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexEnd)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexEnd); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexEnd); GVTGlyphMetrics metrics = it.getGlyphMetrics(info.glyphIndexEnd); Point2D.Float result = new Point2D.Float (metrics.getHorizontalAdvance(), 0); if ( glyphTransform != null ) glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
protected Point2D getEndPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexEnd)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexEnd); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexEnd); GVTGlyphMetrics metrics = it.getGlyphMetrics(info.glyphIndexEnd); Point2D.Float result = new Point2D.Float (metrics.getHorizontalAdvance(), 0); if ( glyphTransform != null ) glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
protected Point2D getEndPoint(CharacterInformation info){ GVTGlyphVector it = info.layout.getGlyphVector(); if (!it.isGlyphVisible(info.glyphIndexEnd)) return null; Point2D b = it.getGlyphPosition(info.glyphIndexEnd); AffineTransform glyphTransform; glyphTransform = it.getGlyphTransform(info.glyphIndexEnd); GVTGlyphMetrics metrics = it.getGlyphMetrics(info.glyphIndexEnd); Point2D.Float result = new Point2D.Float (metrics.getHorizontalAdvance(), 0); if ( glyphTransform != null ) glyphTransform.transform(result,result); result.x += b.getX(); result.y += b.getY(); return result; }
float dy = 0f; Point2D[] newPositions = new Point2D[numGlyphs+1]; Point2D prevPos = gv.getGlyphPosition(0); int prevCode = gv.getGlyphCode(0); float x = (float) prevPos.getX(); = new Point2D.Double(advance.getX() - (gv.getGlyphPosition(numGlyphs-1).getX() - x), advance.getY() - (gv.getGlyphPosition(numGlyphs-1).getY() - y)); Point2D gpos = gv.getGlyphPosition(i); int currCode; currCode = (i == numGlyphs)?-1:gv.getGlyphCode(i); prevPos = gv.getGlyphPosition(0); x = (float) prevPos.getX(); y = (float) prevPos.getY(); Point2D gpos = gv.getGlyphPosition(i); dx = (float)gpos.getX()-(float)prevPos.getX(); dy = (float)gpos.getY()-(float)prevPos.getY(); gpos = gv.getGlyphPosition(i); gm = gv.getGlyphMetrics(i); Point2D gPos = gv.getGlyphPosition(numGlyphs); x += (float) (gPos.getX()-prevPos.getX()); y += (float) (gPos.getY()-prevPos.getY()); double advX = gv.getGlyphPosition(numGlyphs-1).getX()
Point2D firstGlyphPosition = gv.getGlyphPosition(0); float glyphOffset = 0; // offset perpendicular to path float currentPosition; Point2D currentGlyphPos = gv.getGlyphPosition(i); Point2D nextGlyphPosition = gv.getGlyphPosition(i+1); if (horizontal) { glyphAdvance = (float)(nextGlyphPosition.getX() - Point2D lastGlyphPos = gv.getGlyphPosition(lastGlyphDrawn); if (horizontal) { textPathAdvance = new Point2D.Double
Point2D firstGlyphPosition = gv.getGlyphPosition(0); float glyphOffset = 0; // offset perpendicular to path float currentPosition; Point2D currentGlyphPos = gv.getGlyphPosition(i); Point2D nextGlyphPosition = gv.getGlyphPosition(i+1); if (horizontal) { glyphAdvance = (float)(nextGlyphPosition.getX() - Point2D lastGlyphPos = gv.getGlyphPosition(lastGlyphDrawn); if (horizontal) { textPathAdvance = new Point2D.Double
int end = ggi.getEnd(); boolean [] hide = ggi.getHide(); Point2D p2d = gv.getGlyphPosition(start); double deltaX = p2d.getX(); double advAdj = 0; for (int g=start; g<=end; g++) { Point2D np2d = gv.getGlyphPosition(g+1); if (hide[g-start]) { gv.setGlyphVisible(g, false);
int end = ggi.getEnd(); boolean [] hide = ggi.getHide(); Point2D p2d = gv.getGlyphPosition(start); double deltaX = p2d.getX(); double advAdj = 0; for (int g=start; g<=end; g++) { Point2D np2d = gv.getGlyphPosition(g+1); if (hide[g-start]) { gv.setGlyphVisible(g, false);
int end = ggi.getEnd(); boolean [] hide = ggi.getHide(); Point2D p2d = gv.getGlyphPosition(start); double deltaX = p2d.getX(); double advAdj = 0; for (int g=start; g<=end; g++) { Point2D np2d = gv.getGlyphPosition(g+1); if (hide[g-start]) { gv.setGlyphVisible(g, false);