painter
Class CheckerPainter

java.lang.Object
  extended by painter.CheckerPainter
All Implemented Interfaces:
IPainter

public class CheckerPainter
extends java.lang.Object
implements IPainter


Constructor Summary
CheckerPainter(IPainter a, IPainter b, double size)
          constructor
CheckerPainter(RGBColor a, RGBColor b, double size)
          constructor
 
Method Summary
 RGBColor getColor(IntersectionInfo intersection)
           
 IPainter getCopy()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckerPainter

public CheckerPainter(IPainter a,
                      IPainter b,
                      double size)
constructor

Parameters:
a - painter of the "white" fields
b - painter of the "black" fields
size - tiling (size of on tile)

CheckerPainter

public CheckerPainter(RGBColor a,
                      RGBColor b,
                      double size)
constructor

Parameters:
a - color of the "white" fields
b - color of the "black" fields
size - tiling (size of on tile)
Method Detail

getColor

public RGBColor getColor(IntersectionInfo intersection)
Specified by:
getColor in interface IPainter
Returns:
the computed color as an RGBColor

getCopy

public IPainter getCopy()
Specified by:
getCopy in interface IPainter
Returns:
a copy of the painter