fop 1.1

## org.apache.fop.render.java2d
Class Java2DBorderPainter

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

    public class Java2DBorderPainter

extends BorderPainter

Java2D-specific implementation of the `BorderPainter`.

Constructor Summary
`Java2DBorderPainter(Java2DPainter painter)` Construct a java2d border painter.

Method Summary
`protected void` `clip()` Reduces the current clipping region to the current path.
`protected void` `closePath()` Closes the current path.
`protected 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` `drawLine(java.awt.Point start, java.awt.Point end, int width, java.awt.Color color, RuleStyle style)` Draws a line/rule.
`protected void` `lineTo(int x, int y)` Draws a line from the current cursor position to the given coordinates.
`protected void` `moveTo(int x, int y)` Moves the cursor to the given coordinate.
`protected void` `restoreGraphicsState()` Restore the last graphics state from the stack.
`protected void` `saveGraphicsState()` Save the graphics state on the stack.

Methods inherited from class org.apache.fop.render.intermediate.BorderPainter
`drawBorders`

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

Constructor Detail

### Java2DBorderPainter

    public Java2DBorderPainter(Java2DPainter painter)

  Construct a java2d border painter.

  Parameters:
    `painter` - a painter

Method Detail

### drawBorderLine

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

  Draws a border line.

  Specified by:
    `drawBorderLine` in class `BorderPainter`
  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

### drawLine

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

  Draws a line/rule.

  Specified by:
    `drawLine` in class `BorderPainter`
  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

### clip

    protected void clip()

  Reduces the current clipping region to the current path.

  Specified by:
    `clip` in class `BorderPainter`

### closePath

    protected void closePath()

  Closes the current path.

  Specified by:
    `closePath` in class `BorderPainter`

### lineTo

    protected void lineTo(int x,
                          int y)

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

  Specified by:
    `lineTo` in class `BorderPainter`
  Parameters:
    `x` - the X coordinate (in millipoints)
    `y` - the Y coordinate (in millipoints)

### moveTo

    protected void moveTo(int x,
                          int y)

  Moves the cursor to the given coordinate.

  Specified by:
    `moveTo` in class `BorderPainter`
  Parameters:
    `x` - the X coordinate (in millipoints)
    `y` - the Y coordinate (in millipoints)

### saveGraphicsState

    protected void saveGraphicsState()

  Save the graphics state on the stack.

  Specified by:
    `saveGraphicsState` in class `BorderPainter`

### restoreGraphicsState

    protected void restoreGraphicsState()

  Restore the last graphics state from the stack.

  Specified by:
    `restoreGraphicsState` in class `BorderPainter`

fop 1.1

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