jaune.target.gb
Class Drawing

java.lang.Object
  |
  +--jaune.target.gb.Drawing

public final class Drawing
extends java.lang.Object


Constructor Summary
Drawing()
           
 
Method Summary
static void box(int x1, int y1, int x2, int y2, int style)
          Draw a box (rectangle) with corners (x1,y1) and (x2,y2) using fill mode 'style' (one of NOFILL or FILL
static void circle(int x, int y, int radius, int style)
          Draw a circle with centre at (x,y) and radius 'radius'.
static void color(int forecolor, int backcolor, int mode)
          Set the current foreground colour (for pixels), background colour, and draw mode
static int getpix(int x, int y)
          Returns the current colour of the pixel at (x,y)
static void gotogxy(int x, int y)
          Sets the current text position to (x,y).
static void gprint(java.lang.String str)
          Print the string 'str' with no interpretation
static void line(int x1, int y1, int x2, int y2)
          Draw a line in the current drawing mode and colour from (x1,y1) to (x2,y2)
static void plot_point(int x, int y)
          Plot a point in the current drawing mode and colour at (x,y)
static void plot(int x, int y, int colour, int mode)
          Old style plot - try plot_point()
static void wrtchr(char chr)
          Prints the character 'chr' in the default font at the current position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drawing

public Drawing()
Method Detail

gprint

public static void gprint(java.lang.String str)
Print the string 'str' with no interpretation

plot

public static void plot(int x,
                        int y,
                        int colour,
                        int mode)
Old style plot - try plot_point()

plot_point

public static void plot_point(int x,
                              int y)
Plot a point in the current drawing mode and colour at (x,y)

line

public static void line(int x1,
                        int y1,
                        int x2,
                        int y2)
Draw a line in the current drawing mode and colour from (x1,y1) to (x2,y2)

box

public static void box(int x1,
                       int y1,
                       int x2,
                       int y2,
                       int style)
Draw a box (rectangle) with corners (x1,y1) and (x2,y2) using fill mode 'style' (one of NOFILL or FILL

circle

public static void circle(int x,
                          int y,
                          int radius,
                          int style)
Draw a circle with centre at (x,y) and radius 'radius'. 'style' sets the fill mode

getpix

public static int getpix(int x,
                         int y)
Returns the current colour of the pixel at (x,y)

wrtchr

public static void wrtchr(char chr)
Prints the character 'chr' in the default font at the current position

gotogxy

public static void gotogxy(int x,
                           int y)
Sets the current text position to (x,y). Note that x and y have units of cells (8 pixels)

color

public static void color(int forecolor,
                         int backcolor,
                         int mode)
Set the current foreground colour (for pixels), background colour, and draw mode