simpleturtle.h File Reference

Descripes the SimpleTurtle functions. More...

#include "../jnilib.h"
#include "../graphic/color.h"

Include dependency graph for simpleturtle.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void backward (jfloat l)
 Moves the turtle backward.
void clearScreen ()
 Clears the Screen.
void forward (jfloat l)
 Moves the turtle forward.
void initSimpleTurtle (const char *classpath, const char *title, jint framewidth, jint frameheight)
 Initializes the Simple Turtle by creating a JVM, creating and displaying a frame and creating a TurtleGraphic for handling the Simple Turtle calls.
void left (jfloat angle)
 Turns the turtle left.
void penDown ()
 Tells the turtle to draw while moveing.
void penUp ()
 Tells the turtle not to draw while moveing.
void print (const char *text)
 Prints the Text on Screen at the current position of the "turtle".
void right (jfloat angle)
 Turns the turtle right.
void setBGColor (Color c)
 Sets the background color of the Frame.
void setColor (Color c)
 Sets the color with which the turtle draws.
void waitForClosingFrame ()
 Waits until the frame is closed by the user.


Detailed Description

Descripes the SimpleTurtle functions.

The SimpleTurtle provides an easy way of the TurtleGraphic. It creates the Frame for you and you can use simple functions to draw and write on the Frame.

If the Simple Turtle is not initialized by calling initSimpleTurtle() before the first Simple Turtle function is called, it will be initialized with default values.

Author:
Stefan Gruber
Date:
19.01.2005

Definition in file simpleturtle.h.


Function Documentation

void backward jfloat  l  ) 
 

Moves the turtle backward.

Parameters:
l - The length to move.
See also:
forward(jfloat l)

Definition at line 116 of file simpleturtle.c.

void clearScreen  ) 
 

Clears the Screen.

Definition at line 198 of file simpleturtle.c.

void forward jfloat  l  ) 
 

Moves the turtle forward.

Parameters:
l - The length to move.
See also:
backward(jfloat l)

Definition at line 104 of file simpleturtle.c.

void initSimpleTurtle const char *  classpath,
const char *  title,
jint  framewidth,
jint  frameheight
 

Initializes the Simple Turtle by creating a JVM, creating and displaying a frame and creating a TurtleGraphic for handling the Simple Turtle calls.

Parameters:
classpath - The classpath where Java library can be found.
title - The title of the frame.
framewidth - The width of the frame.
frameheight - The height of the frame.

Definition at line 70 of file simpleturtle.c.

void left jfloat  angle  ) 
 

Turns the turtle left.

Parameters:
angle - The angel in degrees to turn.
See also:
right(jfloat angle)

Definition at line 128 of file simpleturtle.c.

void penDown  ) 
 

Tells the turtle to draw while moveing.

See also:
penUp()

Definition at line 160 of file simpleturtle.c.

void penUp  ) 
 

Tells the turtle not to draw while moveing.

See also:
penDown()

Definition at line 150 of file simpleturtle.c.

void print const char *  text  ) 
 

Prints the Text on Screen at the current position of the "turtle".

Parameters:
text - The text to draw.

Definition at line 170 of file simpleturtle.c.

void right jfloat  angle  ) 
 

Turns the turtle right.

Parameters:
angle - The angel in degrees to turn.
See also:
left(jfloat angle)

Definition at line 140 of file simpleturtle.c.

void setBGColor Color  c  ) 
 

Sets the background color of the Frame.

Parameters:
c - The new Color.

Definition at line 190 of file simpleturtle.c.

void setColor Color  c  ) 
 

Sets the color with which the turtle draws.

Parameters:
c - The new Color.

Definition at line 180 of file simpleturtle.c.

void waitForClosingFrame  ) 
 

Waits until the frame is closed by the user.

Definition at line 206 of file simpleturtle.c.


Generated on Sat Nov 19 14:11:15 2005 for GrubC by  doxygen 1.4.4