The screen
(All methods are shared)
- Void startDrawing() & stopDrawing()
All your drawing instructions must be between these two functions
- Void screen.switch()
Switch the screens
- Void screen.print(screen, x, y, text [, color])
Print a text on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x (Number): x-coordinate where to draw
y (Number): y-coordinate where to draw
text (String): text to print
color (Color): color of the text
- Void screen.printFont(screen, x, y, text , color, font)
Print a text on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x (Number): x-coordinate where to draw
y (Number): y-coordinate where to draw
text (String): text to print
color (Color): color of the text
font (Font) : special font
- Void screen.blit(screen, x, y, image, [, sourcex, sourcey] [, width, height])
Blit an image on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x (Number): x-coordinate where to draw
y (Number): y-coordinate where to draw
image (Image): image to blit
sourcex, sourcey (Number): coordinates in the source image to draw
width, height (Number): width and height of the rectangle to draw
- Void screen.drawLine(screen, x0, y0, x1, y1, color)
Draw a line on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x0, y0, x1, y1 (Number): coordinates of the line
color (Color): color of the line
- Void screen.drawRect(screen, x0, y0, x1, y1, color)
Draw a rectangle on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x0, y0, x1, y1 (Number): coordinates of the rectangle
color (Color): color of the rectangle
- Void screen.drawFillRect(screen, x0, y0, x1, y1, color)
Draw a fill rectangle on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x0, y0, x1, y1 (Number): coordinates of the rectangle
color (Color): color of the rectangle
- Void drawGradientRect(screen, x0, y0, x1, y1, color1, color2, color3, color4)
Draw a gradient rectangle on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x0, y0, x1, y1 (Number): coordinates of the rectangle
color1, color2, color3, color4 (Color): colors of the rectangle
- Void drawTextBox(screen, x0, y0, x1, y1, text [, color])
Draw a text box on the screen
screen (Number): screen where to draw (SCREEN_UP or SCREEN_DOWN)
x0, y0, x1, y1 (Number): coordinates of the text box
text (String): text to print
color (Color): color of the text box