public static void addMargins(Area curBlock,
CommonBorderAndPadding bpProps,
CommonMarginBlock marginProps) {
- int spaceStart = marginProps.startIndent -
- bpProps.getBorderStartWidth(false) -
- bpProps.getPaddingStart(false);
+ int spaceStart = marginProps.startIndent
+ - bpProps.getBorderStartWidth(false)
+ - bpProps.getPaddingStart(false);
if (spaceStart != 0) {
curBlock.addTrait(Trait.SPACE_START, new Integer(spaceStart));
}
- int spaceEnd = marginProps.endIndent -
- bpProps.getBorderEndWidth(false) -
- bpProps.getPaddingEnd(false);
+ int spaceEnd = marginProps.endIndent
+ - bpProps.getBorderEndWidth(false)
+ - bpProps.getPaddingEnd(false);
if (spaceEnd != 0) {
curBlock.addTrait(Trait.SPACE_END, new Integer(spaceEnd));
}
}
public static void addBreaks(Area curArea, LayoutProps layoutProps) {
- curArea.addTrait(Trait.BREAK_AFTER, new Integer(layoutProps.breakAfter));
+ curArea.addTrait(Trait.BREAK_AFTER, new Integer(layoutProps.breakAfter));
curArea.addTrait(Trait.BREAK_BEFORE, new Integer(layoutProps.breakBefore));
}
}
int bl = currentBPPosition + bpMarginOffset + text.getOffset();
/* System.out.println("Text = " + text.getTextArea() +
- "; text width: " + text.getWidth() +
- "; BlockIP Position: " + currentBlockIPPosition +
+ "; text width: " + text.getWidth() +
+ "; BlockIP Position: " + currentBlockIPPosition +
"; currentBPPosition: " + currentBPPosition +
"; offset: " + text.getOffset());
*/
closeText();
pdf.append("1 0 0 -1 " + (rx / 1000f) + " " + (bl / 1000f) + " Tm "
- + (text.getTextSpaceAdjust()/1000f) + " Tw [" + startText);
+ + (text.getTextSpaceAdjust() / 1000f) + " Tw [" + startText);
prevWordY = bl;
textOpen = true;
} else {
closeText();
pdf.append("1 0 0 -1 " + (rx / 1000f) + " " + (bl / 1000f) + " Tm "
- + (text.getTextSpaceAdjust()/1000f) + " Tw [" + startText);
+ + (text.getTextSpaceAdjust() / 1000f) + " Tw [" + startText);
textOpen = true;
}
prevWordWidth = text.getWidth();