diff options
author | Jeremias Maerki <jeremias@apache.org> | 2010-09-30 11:51:08 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2010-09-30 11:51:08 +0000 |
commit | ba7f42b128a5265f443c401613378aaa504d727d (patch) | |
tree | 814718c081744d315598934ab7b6c3e806d4fffb /src/java/org/apache/fop/render/pdf/PDFPainter.java | |
parent | 1e510128c7dc3e1d049a9a26f1067d98c92b6b70 (diff) | |
download | xmlgraphics-fop-ba7f42b128a5265f443c401613378aaa504d727d.tar.gz xmlgraphics-fop-ba7f42b128a5265f443c401613378aaa504d727d.zip |
Bugzilla #49913:
Initial code drop for support of rounded corners.
Submitted by: Peter Hancock <peter.hancock.at.gmail.com>
Changes to patch:
- Java 1.5 methods eliminated
- Some (not all!) Checkstyle violations fixed.
- Fixed some excessive and missing whitespace
- paintCornersAsBitmap() in AFPPainter was missing a call to ImageSize.calcPixelsFromSize()
- Made AT representation of border traits cleaner
- Added a TODO for table borders (inner and outer versions)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_RoundedCorners@1003020 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/PDFPainter.java')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFPainter.java | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFPainter.java b/src/java/org/apache/fop/render/pdf/PDFPainter.java index 161b46617..273426c0b 100644 --- a/src/java/org/apache/fop/render/pdf/PDFPainter.java +++ b/src/java/org/apache/fop/render/pdf/PDFPainter.java @@ -224,6 +224,20 @@ public class PDFPainter extends AbstractIFPainter { } /** {@inheritDoc} */ + public void clipBackground(Rectangle rect, + BorderProps bpsBefore, BorderProps bpsAfter, + BorderProps bpsStart, BorderProps bpsEnd) throws IFException { + + try { + borderPainter.clipBackground(rect, + bpsBefore, bpsAfter, bpsStart, bpsEnd); + } catch (IOException ioe) { + throw new IFException("I/O error while clipping background", ioe); + } + + } + + /** {@inheritDoc} */ public void fillRect(Rectangle rect, Paint fill) throws IFException { if (fill == null) { return; @@ -256,17 +270,21 @@ public class PDFPainter extends AbstractIFPainter { /** {@inheritDoc} */ public void drawBorderRect(Rectangle rect, BorderProps before, BorderProps after, - BorderProps start, BorderProps end) throws IFException { + BorderProps start, BorderProps end, Color innerBackgroundColor) throws IFException { if (before != null || after != null || start != null || end != null) { generator.endTextObject(); try { - this.borderPainter.drawBorders(rect, before, after, start, end); - } catch (IOException ioe) { - throw new IFException("I/O error while drawing borders", ioe); + this.borderPainter.drawBorders(rect, before, after, start, end, + innerBackgroundColor); + } catch (IFException ioe) { + throw new IFException("IF error while drawing borders", ioe); } } } + + + /** {@inheritDoc} */ public void drawLine(Point start, Point end, int width, Color color, RuleStyle style) throws IFException { |