drawPrimitiveString
protected void drawPrimitiveString(Graphics2D g2d,
Point2D loc,
Font font,
String txt,
float tx)
getBounds2D
public Rectangle2D getBounds2D(TextNode node)
Get the bounds.
This uses the StrokingTextPainter to get the bounds
since in theory it should be the same.
getGeometryBounds
public Rectangle2D getGeometryBounds(TextNode node)
Get the geometry bounds.
This uses the StrokingTextPainter to get the bounds
since in theory it should be the same.
getHighlightShape
public Shape getHighlightShape(Mark beginMark,
Mark endMark)
Get the highlighted shape.
This does nothing since the output is pdf and not interactive.
beginMark
- the start markendMark
- the end mark
getMark
public Mark getMark(TextNode node,
int pos,
boolean all)
Get the mark.
This does nothing since the output is pdf and not interactive.
node
- the text nodepos
- the positionall
- select all
getOutline
public Shape getOutline(TextNode node)
Get the outline shape of the text characters.
This uses the StrokingTextPainter to get the outline
shape since in theory it should be the same.
- the outline shape of the text characters
getSelected
public int[] getSelected(Mark start,
Mark finish)
Get selected.
This does nothing since the output is pdf and not interactive.
start
- the start markfinish
- the finish mark
getText
protected String getText(AttributedCharacterIterator aci)
Extract the raw text from an ACI.
paint
public void paint(TextNode node,
Graphics2D g2d)
Paints the specified attributed character iterator using the
specified Graphics2D and context and font context.
node
- the TextNode to paintg2d
- the Graphics2D to use
paintACI
protected Point2D paintACI(AttributedCharacterIterator aci,
Graphics2D g2d,
Point2D loc)
Paint an ACI on a Graphics2D at a given location. The method has to
update the location after painting.
aci
- ACI to paintg2d
- Graphics2D to paint onloc
- start location
paintTextRun
protected Point2D paintTextRun(StrokingTextPainter.TextRun run,
Graphics2D g2d,
Point2D loc)
Paint a single text run on the Graphics2D at a given location.
run
- the text run to paintg2d
- the Graphics2D to paint toloc
- the current location of the "cursor"
- the new location of the "cursor" after painting the text run
paintTextRuns
protected void paintTextRuns(List textRuns,
Graphics2D g2d,
Point2D loc)
Paint a list of text runs on the Graphics2D at a given location.
textRuns
- the list of text runsg2d
- the Graphics2D to paint toloc
- the current location of the "cursor"
selectAt
public Mark selectAt(double x,
double y,
TextNode node)
Select at.
This does nothing since the output is pdf and not interactive.
x
- the x positiony
- the y positionnode
- the text node
selectFirst
public Mark selectFirst(TextNode node)
Selec first.
This does nothing since the output is pdf and not interactive.
selectLast
public Mark selectLast(TextNode node)
Select last.
This does nothing since the output is pdf and not interactive.
selectTo
public Mark selectTo(double x,
double y,
Mark beginMark)
Select to.
This does nothing since the output is pdf and not interactive.
x
- the x positiony
- the y positionbeginMark
- the start mark