Package ca.cgjennings.layout
Class LayoutSegment
- java.lang.Object
-
- ca.cgjennings.layout.LayoutSegment
-
public class LayoutSegment extends java.lang.ObjectA TextLayout together with the positional information needed to draw it in the position it was placed by a markup renderer. The renderer does this by appending a sequence of segments that represent what it would have drawn if it had been drawing. Note that a line may consist of multiple segments.- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description LayoutSegment(java.awt.font.TextLayout layout, float xOffset, float yOffset, float yBottom, boolean startOfLine, int sourceParagraph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(java.awt.Graphics2D g)voiddraw(java.awt.Graphics2D g, float dx, float dy)floatgetAscent()floatgetDescent()intgetSourceParagraphIndex()floatgetXOffset()floatgetYBottom()floatgetYOffset()booleanisStartOfLine()voidtranslate(double dx, double dy)
-
-
-
Method Detail
-
getAscent
public float getAscent()
-
getDescent
public float getDescent()
-
getXOffset
public float getXOffset()
-
getYOffset
public float getYOffset()
-
getYBottom
public float getYBottom()
-
isStartOfLine
public boolean isStartOfLine()
-
getSourceParagraphIndex
public int getSourceParagraphIndex()
-
draw
public void draw(java.awt.Graphics2D g)
-
draw
public void draw(java.awt.Graphics2D g, float dx, float dy)
-
translate
public void translate(double dx, double dy)
-
-