1
0
Fork 0

Added Pen width adjustment

This commit is contained in:
Jan Christian Grünhage 2015-02-11 11:45:39 +01:00
parent 66a52a118e
commit 0e86f60d2b
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,8 @@ import ch.aplu.turtle.Turtle;
*/
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);
}