protected final void logTextRun(TextRun textRun) { AttributedCharacterIterator runaci = textRun.getACI(); TextSpanLayout layout = textRun.getLayout(); runaci.first(); if (log.isTraceEnabled()) { int charCount = runaci.getEndIndex() - runaci.getBeginIndex(); log.trace("================================================"); log.trace("New text run:"); log.trace("char count: " + charCount); log.trace("range: " + runaci.getBeginIndex() + " - " + runaci.getEndIndex()); log.trace("glyph count: " + layout.getGlyphCount()); //=getNumGlyphs() } }
protected float distanceBetweenRun (CharacterInformation last, CharacterInformation first){ float distance; Point2D startPoint; Point2D endPoint; CharacterInformation info = new CharacterInformation(); //determine where the last run stops info.layout = last.layout; info.glyphIndexEnd = last.layout.getGlyphCount()-1; startPoint = getEndPoint(info); //determine where the next run starts info.layout = first.layout; info.glyphIndexStart = 0; endPoint = getStartPoint(info); if( first.isVertical() ){ distance = (float)(endPoint.getY() - startPoint.getY()); } else{ distance = (float)(endPoint.getX() - startPoint.getX()); } return distance; }
protected float distanceBetweenRun (CharacterInformation last, CharacterInformation first){ float distance; Point2D startPoint; Point2D endPoint; CharacterInformation info = new CharacterInformation(); //determine where the last run stops info.layout = last.layout; info.glyphIndexEnd = last.layout.getGlyphCount()-1; startPoint = getEndPoint(info); //determine where the next run starts info.layout = first.layout; info.glyphIndexStart = 0; endPoint = getStartPoint(info); if( first.isVertical() ){ distance = (float)(endPoint.getY() - startPoint.getY()); } else{ distance = (float)(endPoint.getX() - startPoint.getX()); } return distance; }
protected float distanceBetweenRun (CharacterInformation last, CharacterInformation first){ float distance; Point2D startPoint; Point2D endPoint; CharacterInformation info = new CharacterInformation(); //determine where the last run stops info.layout = last.layout; info.glyphIndexEnd = last.layout.getGlyphCount()-1; startPoint = getEndPoint(info); //determine where the next run starts info.layout = first.layout; info.glyphIndexStart = 0; endPoint = getStartPoint(info); if( first.isVertical() ){ distance = (float)(endPoint.getY() - startPoint.getY()); } else{ distance = (float)(endPoint.getX() - startPoint.getX()); } return distance; }
info.glyphIndexEnd = info.layout.getGlyphCount()-1; } else { info.glyphIndexStart = info.layout.getGlyphIndex info.glyphIndexEnd = info.layout.getGlyphCount()-1;
info.glyphIndexEnd = info.layout.getGlyphCount() - 1; } else { info.glyphIndexStart = info.layout.getGlyphIndex info.glyphIndexEnd = info.layout.getGlyphCount() - 1; } else { info.glyphIndexEnd = info.glyphIndexStart;
info.glyphIndexEnd = info.layout.getGlyphCount() - 1; } else { info.glyphIndexStart = info.layout.getGlyphIndex info.glyphIndexEnd = info.layout.getGlyphCount() - 1; } else { info.glyphIndexEnd = info.glyphIndexStart;
TextSpanLayout layout = r.getLayout(); GVTGlyphMetrics lastMetrics = layout.getGlyphMetrics(layout.getGlyphCount()-1); GVTLineMetrics lastLineMetrics = layout.getLineMetrics(); Rectangle2D lastBounds = lastMetrics.getBounds2D();
TextSpanLayout layout = r.getLayout(); GVTGlyphMetrics lastMetrics = layout.getGlyphMetrics(layout.getGlyphCount()-1); GVTLineMetrics lastLineMetrics = layout.getLineMetrics(); Rectangle2D lastBounds = lastMetrics.getBounds2D();
TextSpanLayout layout = r.getLayout(); GVTGlyphMetrics lastMetrics = layout.getGlyphMetrics(layout.getGlyphCount()-1); GVTLineMetrics lastLineMetrics = layout.getLineMetrics(); Rectangle2D lastBounds = lastMetrics.getBounds2D();