pythagoreantree/src/Fractals/TurtleTools/DrawingTools.java
Jan Christian Grünhage bec95321ac Moved some files around
2015-02-18 12:30:24 +01:00

27 lines
661 B
Java

package Fractals.TurtleTools;
import ch.aplu.turtle.Turtle;
/**
* Created by Christian on 10.02.2015.
*/
public class DrawingTools {
public static void drawSquare(Turtle turtle, double size) {
int width = (int) size / 10;
turtle.penWidth(width);
for (int i = 0; i < 4; i++) {
turtle.forward(size).left(90);
}
}
public static void drawFilledSquare(Turtle turtle, double size) {
turtle.startPath();
int width = (int) size / 10;
turtle.penWidth(width);
for (int i = 0; i < 4; i++) {
turtle.forward(size).left(90);
}
turtle.fillPath();
}
}