aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/intermediate/IFRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/render/intermediate/IFRenderer.java')
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFRenderer.java34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/intermediate/IFRenderer.java b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
index bdeb1e9a1..1d20da519 100644
--- a/src/java/org/apache/fop/render/intermediate/IFRenderer.java
+++ b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
@@ -1231,21 +1231,49 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
handleIFException(ife);
}
}
-
+ /** {@inheritDoc} */
+ protected void clipBackground(float startx, float starty,
+ float width, float height,
+ BorderProps bpsBefore, BorderProps bpsAfter,
+ BorderProps bpsStart, BorderProps bpsEnd) {
+ pushGroup(new IFGraphicContext.Group());
+ Rectangle rect = toMillipointRectangle(startx, starty, width, height);
+ try {
+ painter.clipBackground( rect,
+ bpsBefore, bpsAfter, bpsStart, bpsEnd);
+ } catch (IFException ife) {
+ handleIFException(ife);
+ }
+ }
/** {@inheritDoc} */
protected void closePath() {
throw new IllegalStateException("Not used");
}
/** {@inheritDoc} */
+ protected void drawBackground(float startx, float starty,
+ float width, float height,
+ Trait.Background back,
+ BorderProps bpsBefore, BorderProps bpsAfter,
+ BorderProps bpsStart, BorderProps bpsEnd) {
+ if (painter.isBackgroundRequired(bpsBefore, bpsAfter, bpsStart, bpsEnd)) {
+ super.drawBackground(startx, starty, width, height,
+ back, bpsBefore, bpsAfter,
+ bpsStart, bpsEnd);
+ }
+ }
+
+ /** {@inheritDoc} */
protected void drawBorders( // CSOK: ParameterNumber
float startx, float starty,
float width, float height,
BorderProps bpsBefore, BorderProps bpsAfter,
- BorderProps bpsStart, BorderProps bpsEnd) {
+ BorderProps bpsStart, BorderProps bpsEnd, Color innerBackgroundColor) {
+ //TODO lose scale?
Rectangle rect = toMillipointRectangle(startx, starty, width, height);
try {
- painter.drawBorderRect(rect, bpsBefore, bpsAfter, bpsStart, bpsEnd);
+ painter.drawBorderRect(rect, bpsBefore, bpsAfter, bpsStart, bpsEnd,
+ innerBackgroundColor);
} catch (IFException ife) {
handleIFException(ife);
}