fop 1.1

## org.apache.fop.render.intermediate
Class BorderPainter

    java.lang.Object
      org.apache.fop.render.intermediate.BorderPainter

Direct Known Subclasses:
  Java2DBorderPainter, PDFBorderPainter, PSBorderPainter

    public abstract class BorderPainter

extends java.lang.Object

This is an abstract base class for handling border painting.

Constructor Summary
`BorderPainter()`

Method Summary
`protected abstract void` `clip()` Reduces the current clipping region to the current path.
`protected abstract void` `closePath()` Closes the current path.
`protected abstract void` `drawBorderLine(int x1, int y1, int x2, int y2, boolean horz, boolean startOrBefore, int style, java.awt.Color color)` Draws a border line.
`void` `drawBorders(java.awt.Rectangle borderRect, BorderProps bpsTop, BorderProps bpsBottom, BorderProps bpsLeft, BorderProps bpsRight)` Draws borders.
`abstract void` `drawLine(java.awt.Point start, java.awt.Point end, int width, java.awt.Color color, RuleStyle style)` Draws a line/rule.
`protected abstract void` `lineTo(int x, int y)` Draws a line from the current cursor position to the given coordinates.
`protected abstract void` `moveTo(int x, int y)` Moves the cursor to the given coordinate.
`protected abstract void` `restoreGraphicsState()` Restore the last graphics state from the stack.
`protected abstract void` `saveGraphicsState()` Save the graphics state on the stack.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BorderPainter

    public BorderPainter()

Method Detail

### drawBorders

    public void drawBorders(java.awt.Rectangle borderRect,
                            BorderProps bpsTop,
                            BorderProps bpsBottom,
                            BorderProps bpsLeft,
                            BorderProps bpsRight)
                     throws java.io.IOException

  Draws borders.

  Parameters:
    `borderRect` - the border rectangle
    `bpsTop` - the border specification on the top side
    `bpsBottom` - the border specification on the bottom side
    `bpsLeft` - the border specification on the left side
    `bpsRight` - the border specification on the end side
  Throws:
    `java.io.IOException` - if an I/O error occurs while creating the borders

### drawBorderLine

    protected abstract void drawBorderLine(int x1,
                                           int y1,
                                           int x2,
                                           int y2,
                                           boolean horz,
                                           boolean startOrBefore,
                                           int style,
                                           java.awt.Color color)
                                    throws java.io.IOException

  Draws a border line.

  Parameters:
    `x1` - X coordinate of the upper left corner of the line's bounding rectangle (in millipoints)
    `y1` - start Y coordinate of the upper left corner of the line's bounding rectangle (in millipoints)
    `x2` - end X coordinate of the lower right corner of the line's bounding rectangle (in millipoints)
    `y2` - end y coordinate of the lower right corner of the line's bounding rectangle (in millipoints)
    `horz` - true if it is a horizontal line
    `startOrBefore` - true if the line is the start or end edge of a border box
    `style` - the border style
    `color` - the border color
  Throws:
    `java.io.IOException` - if an I/O error occurs

### drawLine

    public abstract void drawLine(java.awt.Point start,
                                  java.awt.Point end,
                                  int width,
                                  java.awt.Color color,
                                  RuleStyle style)
                           throws java.io.IOException

  Draws a line/rule.

  Parameters:
    `start` - start point (coordinates in millipoints)
    `end` - end point (coordinates in millipoints)
    `width` - width of the line
    `color` - the line color
    `style` - the rule style
  Throws:
    `java.io.IOException` - if an I/O error occurs

### moveTo

    protected abstract void moveTo(int x,
                                   int y)
                            throws java.io.IOException

  Moves the cursor to the given coordinate.

  Parameters:
    `x` - the X coordinate (in millipoints)
    `y` - the Y coordinate (in millipoints)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### lineTo

    protected abstract void lineTo(int x,
                                   int y)
                            throws java.io.IOException

  Draws a line from the current cursor position to the given coordinates.

  Parameters:
    `x` - the X coordinate (in millipoints)
    `y` - the Y coordinate (in millipoints)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### closePath

    protected abstract void closePath()
                               throws java.io.IOException

  Closes the current path.

  Throws:
    `java.io.IOException` - if an I/O error occurs

### clip

    protected abstract void clip()
                          throws java.io.IOException

  Reduces the current clipping region to the current path.

  Throws:
    `java.io.IOException` - if an I/O error occurs

### saveGraphicsState

    protected abstract void saveGraphicsState()
                                       throws java.io.IOException

  Save the graphics state on the stack.

  Throws:
    `java.io.IOException` - if an I/O error occurs

### restoreGraphicsState

    protected abstract void restoreGraphicsState()
                                          throws java.io.IOException

  Restore the last graphics state from the stack.

  Throws:
    `java.io.IOException` - if an I/O error occurs

fop 1.1

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.