Package org.apache.fop.render.afp
Class AFPPainter.AFPBorderPainterAdapter
java.lang.Object
org.apache.fop.render.intermediate.BorderPainter
org.apache.fop.render.afp.AFPPainter.AFPBorderPainterAdapter
- Enclosing class:
AFPPainter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
-
Field Summary
FieldsFields inherited from class org.apache.fop.render.intermediate.BorderPainter
BOTTOM, BOTTOM_LEFT, BOTTOM_RIGHT, DASHED_BORDER_LENGTH_FACTOR, DASHED_BORDER_SPACE_RATIO, LEFT, RIGHT, TOP, TOP_LEFT, TOP_RIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionAFPBorderPainterAdapter
(GraphicsPainter graphicsPainter, AFPPainter painter, AFPDocumentHandler documentHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
arcTo
(double startAngle, double endAngle, int cx, int cy, int width, int height) void
drawBorders
(Rectangle borderRect, BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd, Color innerBackgroundColor) Draws borders.private void
drawRoundedCorners
(Rectangle borderRect, BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd, Color innerBackgroundColor) private String
private boolean
hasRoundedCorners
(BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd) private boolean
isBackgroundRequired
(BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd) private boolean
private Area
makeCornerBorderBPD
(int beforeRadius, int startRadius, int beforeWidth, int startWidth, AffineTransform transform) private Area
makeCornerBorderIPD
(int beforeRadius, int startRadius, int beforeWidth, int startWidth, AffineTransform transform) private Area
makeCornerClip
(int beforeRadius, int startRadius, AffineTransform transform) private String
makeKey
(Rectangle area, BorderProps beforeProps, BorderProps endProps, BorderProps afterProps, BorderProps startProps, Color innerBackgroundColor) private void
paintCornersAsBitmap
(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, Rectangle boundingBox, String name) Methods inherited from class org.apache.fop.render.intermediate.BorderPainter
calculateCornerCorrectionFactor, calculateCornerScaleCorrection, clipBackground, dashWidthCalculator, drawRectangularBorders, drawRoundedBorders
-
Field Details
-
painter
-
documentHandler
-
-
Constructor Details
-
AFPBorderPainterAdapter
public AFPBorderPainterAdapter(GraphicsPainter graphicsPainter, AFPPainter painter, AFPDocumentHandler documentHandler)
-
-
Method Details
-
drawBorders
public void drawBorders(Rectangle borderRect, BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd, Color innerBackgroundColor) throws IFException Description copied from class:BorderPainter
Draws borders.- Overrides:
drawBorders
in classBorderPainter
- Parameters:
borderRect
- the border rectanglebpsBefore
- the border specification on the top sidebpsAfter
- the border specification on the bottom sidebpsStart
- the border specification on the left sidebpsEnd
- the border specification on the end sideinnerBackgroundColor
- the inner background color- Throws:
IFException
- if an error occurs while drawing the borders
-
isBackgroundRequired
private boolean isBackgroundRequired(BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd) -
hasRoundedCorners
private boolean hasRoundedCorners(BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd) -
drawRoundedCorners
private void drawRoundedCorners(Rectangle borderRect, BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd, Color innerBackgroundColor) throws IFException - Throws:
IFException
-
isNotCollapseOuter
-
makeCornerClip
-
makeCornerBorderBPD
private Area makeCornerBorderBPD(int beforeRadius, int startRadius, int beforeWidth, int startWidth, AffineTransform transform) -
makeCornerBorderIPD
private Area makeCornerBorderIPD(int beforeRadius, int startRadius, int beforeWidth, int startWidth, AffineTransform transform) -
makeKey
private String makeKey(Rectangle area, BorderProps beforeProps, BorderProps endProps, BorderProps afterProps, BorderProps startProps, Color innerBackgroundColor) -
hash
-
paintCornersAsBitmap
private void paintCornersAsBitmap(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, Rectangle boundingBox, String name) throws IFException - Throws:
IFException
-
arcTo
protected void arcTo(double startAngle, double endAngle, int cx, int cy, int width, int height) throws IOException - Throws:
IOException
-