de.caff.maze
Interface MazePainter

All Known Implementing Classes:
DxfMazePainter, Graphics2DMazePainter, SvgMazePainter

public interface MazePainter

Interface for generalized painting, allowing easier conversion to vector formats.

 

Nested Class Summary
static class MazePainter.PaintObjectType
          The current state of painting.
 
Method Summary
 void draw(java.awt.Shape shape)
          Draw a shape with current paint and stroke.
 void drawArc(float x, float y, float w, float h, float start, float extent)
          Draw an open arc with current paint and stroke.
 void drawLine(float startX, float startY, float endX, float endY)
          Draw a line with current paint and stroke..
 void endPainting(MazePainter.PaintObjectType type)
          End painting the given type of paint objects.
 void endPaintingMaze()
          End painting the maze.
 void fill(java.awt.Shape shape)
          Fill a shape with the current paint.
 void setPaint(java.awt.Paint paint)
          Set a paint.
 void setStroke(java.awt.Stroke stroke)
          Set a stroke.
 void startPainting(MazePainter.PaintObjectType type)
          Start painting the given type of paint objects.
 void startPaintingMaze(Maze maze)
          Start painting the maze.
 

Method Detail

startPaintingMaze

void startPaintingMaze(Maze maze)
Start painting the maze.

Parameters:
maze - painted maze

endPaintingMaze

void endPaintingMaze()
End painting the maze.


startPainting

void startPainting(MazePainter.PaintObjectType type)
Start painting the given type of paint objects.

Parameters:
type - object type which painting starts

endPainting

void endPainting(MazePainter.PaintObjectType type)
End painting the given type of paint objects.

Parameters:
type - object type which painting has ended

setStroke

void setStroke(java.awt.Stroke stroke)
Set a stroke.

Parameters:
stroke - new stroke to use in upcoming drawing commands

setPaint

void setPaint(java.awt.Paint paint)
Set a paint.

Parameters:
paint - paint to use in upcoming drawing commands.

drawLine

void drawLine(float startX,
              float startY,
              float endX,
              float endY)
Draw a line with current paint and stroke..

Parameters:
startX - starting point X coordinate
startY - starting point Y coordinate
endX - ending point X coordinate
endY - ending point Y coordinate

drawArc

void drawArc(float x,
             float y,
             float w,
             float h,
             float start,
             float extent)
Draw an open arc with current paint and stroke.

Parameters:
x - x of rectangle enclosing ellipse
y - y of rectangle enclosing ellipse
w - width of rectangle enclosing ellipse
h - height of rectangle enclosing ellipse
start - start of angle in degrees, from x axis,
extent - extent of angle in degrees

draw

void draw(java.awt.Shape shape)
Draw a shape with current paint and stroke.

Parameters:
shape - shape to draw

fill

void fill(java.awt.Shape shape)
Fill a shape with the current paint.

Parameters:
shape - shape to fill