nodeContext.getContentAreaWidth(), StrictGeomUtility.toInternalValue(textLayout.getAdvance()));
text.setCachedX(alignmentX + nodeContext.getX());
// Create a shallow copy of the paragraph-pool to act as a line container.
final RenderBox line = (RenderBox) paragraph.getPool().deriveFrozen(false);
line.addGeneratedChild(text);
// Align the line inside the paragraph. (Adjust the cachedX position depending on whether the line is left, centred or right aligned)
line.setCachedX(alignmentX + nodeContext.getX());
line.setCachedWidth(nodeContext.getContentAreaWidth());
return line;