Package schule.ngb.zm.layers
Class TurtleLayer.Turtle
java.lang.Object
schule.ngb.zm.Constants
schule.ngb.zm.BasicDrawable
schule.ngb.zm.layers.TurtleLayer.Turtle
- All Implemented Interfaces:
Drawable
,Fillable
,Strokeable
- Enclosing class:
- TurtleLayer
Die Turtle der Zeichenmaschine.
-
Field Summary
Fields inherited from class schule.ngb.zm.BasicDrawable
fill, fillColor, stroke, strokeColor, strokeJoin, strokeType, strokeWeight
Fields inherited from class schule.ngb.zm.Constants
APP_NAME, APP_VERSION, APP_VERSION_MAJ, APP_VERSION_MIN, APP_VERSION_REV, ARROW, BEVEL, BLACK, BLUE, BOLD, BROWN, canvasHeight, canvasWidth, CENTER, CLOSED, cmouseX, cmouseY, CROSS, CYAN, DARKGRAY, DASHED, DEFAULT_ANIM_RUNTIME, DEFAULT_BACKGROUND, DEFAULT_BUFFER, DEFAULT_EASING, DEFAULT_FILLCOLOR, DEFAULT_FONTSIZE, DEFAULT_FPS, DEFAULT_HEIGHT, DEFAULT_STROKECOLOR, DEFAULT_STROKEWEIGHT, DEFAULT_WIDTH, delta, DOTTED, DOWN, DOWNLEFT, DOWNRIGHT, EAST, FILLED, framesPerSecond, GRAY, GREEN, HALF_PI, HAND, ITALIC, key, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_A, KEY_ALT, KEY_B, KEY_BACK_SPACE, KEY_C, KEY_CANCEL, KEY_CAPS_LOCK, KEY_CLEAR, KEY_COMMA, KEY_CONTROL, KEY_D, KEY_DOWN, KEY_E, KEY_END, KEY_ENTER, KEY_EQUALS, KEY_ESCAPE, KEY_F, KEY_G, KEY_H, KEY_HOME, KEY_I, KEY_J, KEY_K, KEY_L, KEY_LEFT, KEY_M, KEY_MINUS, KEY_N, KEY_O, KEY_P, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_PAUSE, KEY_PERIOD, KEY_Q, KEY_R, KEY_RIGHT, KEY_S, KEY_SEMICOLON, KEY_SHIFT, KEY_SLASH, KEY_SPACE, KEY_T, KEY_TAB, KEY_U, KEY_UP, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, keyCode, keyEvent, keyPressed, LEFT, LIGHTGRAY, LINES, LINUX, MACOS, MAGENTA, MIDDLE, MITER, MOUSE1, MOUSE2, MOUSE3, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, MOVE, NOMOUSE, NORTH, NORTHEAST, NORTHWEST, OPEN, ORANGE, PI, PIE, PINK, PLAIN, pmouseX, pmouseY, PURPLE, QUARTER_PI, RED, RIGHT, ROUND, runtime, screenHeight, screenWidth, SOLID, SOUTH, SOUTHEAST, SOUTHWEST, TEXT, tick, TWO_PI, UP, UPLEFT, UPRIGHT, WAIT, WEST, WHITE, WINDOWS, YELLOW
-
Method Summary
Modifier and TypeMethodDescriptionvoid
back
(double dist) void
void
bk
(double dist) void
void
draw
(Graphics2D graphics) Wird aufgerufen, um das Objekt auf die Zeichenfläche graphics zu zeichnen.void
fd
(double dist) void
fill()
void
forward
(double dist) boolean
Ob das Objekt angezeigt bzw. gezeichnet werden soll.void
left()
void
left
(double angle) void
lt
(double angle) void
moveTo
(double x, double y) void
penDown()
void
penUp()
void
right()
void
right
(double angle) void
rt
(double angle) Methods inherited from class schule.ngb.zm.BasicDrawable
getFill, getFillColor, getGradient, getStroke, getStrokeColor, getStrokeJoin, getStrokeType, getStrokeWeight, hasFillColor, hasGradient, hide, setFill, setFillColor, setStroke, setStrokeColor, setStrokeJoin, setStrokeType, setStrokeWeight, show, toggle
Methods inherited from class schule.ngb.zm.Constants
abs, arccos, arcsin, arctan, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asInt, asInt, asInt, asInt, asInt, asInt, asInt, asInt, asInt, avg, binary, ceil, choice, choice, choice, choice, color, color, color, color, colorHsb, colorHsl, cos, degrees, distance, floor, fromBinary, fromHex, getRandom, hex, interpolate, limit, limit, loadImage, map, max, max, min, min, morph, noise, noise, noise, noise, pow, radians, random, random, random, random, random, randomBool, randomBool, randomBool, randomColor, randomGaussian, randomNiceColor, round, setSeed, shuffle, shuffle, shuffle, shuffle, sign, sin, sqrt, sum, tan
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface schule.ngb.zm.Fillable
hasFill, noFill, noGradient, resetFill, setFillColor, setFillColor, setFillColor, setFillColor, setFillColor, setGradient, setGradient, setGradient, setGradient
Methods inherited from interface schule.ngb.zm.Strokeable
hasStroke, noStroke, resetStroke, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeColor
-
Method Details
-
isVisible
public boolean isVisible()Description copied from class:BasicDrawable
Ob das Objekt angezeigt bzw. gezeichnet werden soll.- Specified by:
isVisible
in interfaceDrawable
- Overrides:
isVisible
in classBasicDrawable
- Returns:
true
, wenn das Objekt angezeigt werden soll,false
sonst.
-
beginPath
public void beginPath() -
closePath
public void closePath() -
fill
public void fill() -
draw
Description copied from interface:Drawable
Wird aufgerufen, um das Objekt auf die Zeichenfläche graphics zu zeichnen.Das Objekt muss dafür Sorge tragen, dass der Zustand der Zeichenfläche (Transformationsmatrix, Farbe, ...) erhalten bleibt. Das Objekt sollte also etwaige Änderungen am Ende des Aufrufs wieder rückgängig machen.
- Specified by:
draw
in interfaceDrawable
- Specified by:
draw
in classBasicDrawable
- Parameters:
graphics
- Die Zeichenfläche.
-
fd
public void fd(double dist) -
forward
public void forward(double dist) -
bk
public void bk(double dist) -
back
public void back(double dist) -
left
public void left() -
lt
public void lt(double angle) -
left
public void left(double angle) -
right
public void right() -
rt
public void rt(double angle) -
right
public void right(double angle) -
penUp
public void penUp() -
penDown
public void penDown() -
moveTo
public void moveTo(double x, double y)
-