fdubath.entrelacs.tilling
Interface Drawer


public interface Drawer

The interface Drawer allows to provide to the Tilling geometries a way to draw the ropes. By implementing this interface one can add effect to the final output.


Method Summary
 void fillPolygon(int[] rgbColor, double[] coordinateX, double[] coordinateY, int dotNumber)
          Draw a closed shape using dotNumber record in the coordinateX and coordinateY filled with color rgbColor.
 void singleLine(int[] rgbColor, double[] start, double[] end)
          Draw a line from the position start to the position end with color rgbColor.
 void strockPolyLine(int[] rgbColor, double[] coordinateX, double[] coordinateY, int dotNumber)
          Draw a polyline using dotNumber record in the coordinateX and coordinateY strocked with color rgbColor.
 

Method Detail

singleLine

void singleLine(int[] rgbColor,
                double[] start,
                double[] end)
Draw a line from the position start to the position end with color rgbColor.

Parameters:
rgbColor - the color define by 3 integer [Red, Gree, Blue] each one ranging in 0-255.
start - the position [coordonate X, coordonate Y] of the begining of the line.
end - the position [coordonate X, coordonate Y] of the end of the line.

fillPolygon

void fillPolygon(int[] rgbColor,
                 double[] coordinateX,
                 double[] coordinateY,
                 int dotNumber)
Draw a closed shape using dotNumber record in the coordinateX and coordinateY filled with color rgbColor. When called from the tilling package, dotNumber is even and the point 'n' and 'dotNumber-n' are the corresonding points on the both side of the segment.

Parameters:
rgbColor - the color define by 3 integer [Red, Gree, Blue] each one ranging in 0-255.
coordinateX - the horizontal position of the dots defining the shape.
coordinateY - the vertical position of the dots defining the shape.
dotNumber - the number of relevent records stored into the coordinates fields.

strockPolyLine

void strockPolyLine(int[] rgbColor,
                    double[] coordinateX,
                    double[] coordinateY,
                    int dotNumber)
Draw a polyline using dotNumber record in the coordinateX and coordinateY strocked with color rgbColor.

Parameters:
rgbColor - the color define by 3 integer [Red, Gree, Blue] each one ranging in 0-255.
coordinateX - the horizontal position of the dots defining the polyline.
coordinateY - the vertical position of the dots defining the polyline.
dotNumber - the number of relevent records stored into the coordinates fields.