// align children to starting (right) edge of filled area
int ipAdjust;
if ( ( ip instanceof FilledArea ) && ( ( level & 1 ) != 0 ) ) {
int ipdChildren = 0;
for (int i = 0, l = children.size(); i < l; i++) {
InlineArea inline = (InlineArea) children.get(i);
ipdChildren += inline.getAllocIPD();
}
ipAdjust = ip.getAllocIPD() - ipdChildren;
} else {
ipAdjust = 0;
}
// perform inline position adjustments
if ( ( level == -1 ) || ( ( level & 1 ) == 0 ) ) {
currentIPPosition += ip.getBorderAndPaddingWidthStart();
} else {
currentIPPosition += ip.getBorderAndPaddingWidthEnd();
if ( ipAdjust > 0 ) {
currentIPPosition += ipAdjust;
}
}
currentBPPosition += ip.getBlockProgressionOffset();
// render children inlines
for (int i = 0, l = children.size(); i < l; i++) {
InlineArea inline = (InlineArea) children.get(i);
renderInlineArea(inline);
}
currentIPPosition = saveIP + ip.getAllocIPD();
currentBPPosition = saveBP;
}