rx += ((BlockArea)area).getStartIndent();
}
h = area.getContentHeight();
int ry = this.currentYPosition;
ColorType bg = area.getBackgroundColor();
rx = rx - area.getPaddingLeft();
ry = ry + area.getPaddingTop();
w = w + area.getPaddingLeft() + area.getPaddingRight();
h = h + area.getPaddingTop() + area.getPaddingBottom();
// I'm not sure I should have to check for bg being null
// but I do
if ((bg != null) && (bg.alpha() == 0)) {
this.addRect(rx, ry, w, h, bg.red(), bg.green(), bg.blue(),
bg.red(), bg.green(), bg.blue());
}
rx = rx - area.getBorderLeftWidth();
ry = ry + area.getBorderTopWidth();
w = w + area.getBorderLeftWidth() + area.getBorderRightWidth();
h = h + area.getBorderTopWidth() + area.getBorderBottomWidth();
BorderAndPadding bp = area.getBorderAndPadding();
ColorType borderColor;
if (area.getBorderTopWidth() != 0) {
borderColor = bp.getBorderColor(BorderAndPadding.TOP);
addLine(rx, ry, rx + w, ry, area.getBorderTopWidth(),
borderColor.red(), borderColor.green(),
borderColor.blue());
}
if (area.getBorderLeftWidth() != 0) {
borderColor = bp.getBorderColor(BorderAndPadding.LEFT);
addLine(rx, ry, rx, ry - h, area.getBorderLeftWidth(),
borderColor.red(), borderColor.green(),
borderColor.blue());
}
if (area.getBorderRightWidth() != 0) {
borderColor = bp.getBorderColor(BorderAndPadding.RIGHT);
addLine(rx + w, ry, rx + w, ry - h,
area.getBorderRightWidth(), borderColor.red(),
borderColor.green(),
borderColor.blue());
}
if (area.getBorderBottomWidth() != 0) {
borderColor = bp.getBorderColor(BorderAndPadding.BOTTOM);
addLine(rx, ry - h, rx + w, ry - h, area.getBorderBottomWidth(),
borderColor.red(), borderColor.green(),
borderColor.blue());
}
}