back.setRepeat(backProps.backgroundRepeat);
if (backProps.backgroundPositionHorizontal != null) {
if (back.getRepeat() == Constants.EN_NOREPEAT
|| back.getRepeat() == Constants.EN_REPEATY) {
if (area.getIPD() > 0) {
PercentBaseContext refContext = new SimplePercentBaseContext(context,
LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
(referenceIPD - back.getImageInfo().getSize().getWidthMpt()));
back.setHoriz(ipdShift
+ backProps.backgroundPositionHorizontal.getValue(refContext));
} else {
// TODO Area IPD has to be set for this to work
LOG.warn("Horizontal background image positioning ignored"
+ " because the IPD was not set on the area."
+ " (Yes, it's a bug in FOP)");
}
}
}
if (backProps.backgroundPositionVertical != null) {
if (back.getRepeat() == Constants.EN_NOREPEAT
|| back.getRepeat() == Constants.EN_REPEATX) {
if (area.getBPD() > 0) {
PercentBaseContext refContext = new SimplePercentBaseContext(context,
LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL,
(referenceBPD - back.getImageInfo().getSize().getHeightMpt()));
back.setVertical(bpdShift
+ backProps.backgroundPositionVertical.getValue(refContext));
} else {