drawText(text, effectiveAreaX2);
}
}
else if (isClipOnWordBoundary() == false && type == LayoutNodeTypes.TYPE_NODE_COMPLEX_TEXT)
{
final RenderableComplexText text = (RenderableComplexText) node;
//final long ellipseSize = extractEllipseSize(node);
final long x1 = text.getX();
//final long effectiveAreaX2 = (contentAreaX2 - ellipseSize);
if (x1 < contentAreaX2)
{
// The text node that is printed will overlap with the ellipse we need to print.
final Graphics2D g2;
if (getTextSpec() == null)
{
g2 = (Graphics2D) getGraphics().create();
final StyleSheet layoutContext = text.getStyleSheet();
configureGraphics(layoutContext, g2);
g2.setStroke(LogicalPageDrawable.DEFAULT_STROKE);
if (RenderUtility.isFontSmooth(layoutContext, metaData))
{
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
}
else
{
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
}
}
else
{
g2 = getTextSpec().getGraphics();
}
drawComplexText(text, g2);
}
}
ellipseDrawn = true;
final RenderBox parent = node.getParent();
if (parent != null)
{
final RenderBox textEllipseBox = parent.getTextEllipseBox();
if (textEllipseBox != null)
{
processBoxChilds(textEllipseBox);
}
}
return;
}
}
}
if (type == LayoutNodeTypes.TYPE_NODE_TEXT)
{
final RenderableText text = (RenderableText) node;
if (underline != null)
{
final ExtendedBaselineInfo baselineInfo = text.getBaselineInfo();
final long underlinePos = text.getY() + baselineInfo.getUnderlinePosition();
underline.updateVerticalPosition(StrictGeomUtility.toExternalValue(underlinePos));
underline.updateStart(StrictGeomUtility.toExternalValue(text.getX()));
underline.updateEnd(StrictGeomUtility.toExternalValue(text.getX() + text.getWidth()));
}
if (strikeThrough != null)
{
final ExtendedBaselineInfo baselineInfo = text.getBaselineInfo();
final long strikethroughPos = text.getY() + baselineInfo.getStrikethroughPosition();
strikeThrough.updateVerticalPosition(StrictGeomUtility.toExternalValue(strikethroughPos));
strikeThrough.updateStart(StrictGeomUtility.toExternalValue(text.getX()));
strikeThrough.updateEnd(StrictGeomUtility.toExternalValue(text.getX() + text.getWidth()));
}
if (isTextLineOverflow())
{
final long ellipseSize = extractEllipseSize(node);
final long x1 = text.getX();
final long x2 = x1 + text.getWidth();
final long effectiveAreaX2 = (contentAreaX2 - ellipseSize);
if (x2 <= effectiveAreaX2)
{
// the text will be fully visible.
drawText(text);
}
else
{
if (x1 >= contentAreaX2)
{
// Skip, the node will not be visible.
}
else
{
// The text node that is printed will overlap with the ellipse we need to print.
drawText(text, effectiveAreaX2);
}
final RenderBox parent = node.getParent();
if (parent != null)
{
final RenderBox textEllipseBox = parent.getTextEllipseBox();
if (textEllipseBox != null)
{
processBoxChilds(textEllipseBox);
}
}
ellipseDrawn = true;
}
}
else
{
drawText(text);
}
}
else if (type == LayoutNodeTypes.TYPE_NODE_COMPLEX_TEXT)
{
final RenderableComplexText text = (RenderableComplexText) node;
final long x1 = text.getX();
if (x1 >= contentAreaX2)
{
// Skip, the node will not be visible.
}
else
{
// The text node that is printed will overlap with the ellipse we need to print.
final Graphics2D g2;
if (getTextSpec() == null)
{
g2 = (Graphics2D) getGraphics().create();
final StyleSheet layoutContext = text.getStyleSheet();
configureGraphics(layoutContext, g2);
g2.setStroke(LogicalPageDrawable.DEFAULT_STROKE);
if (RenderUtility.isFontSmooth(layoutContext, metaData))
{