Changes

Jump to navigation Jump to search

Overview of the API

96 bytes added, 21:20, 20 May 2011
Line 120: Line 120:  
*'''drawPolyLine'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.
 
*'''drawPolyLine'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.
 
For example
 
For example
 +
<syntaxhighlight lang="lua">
 
  drawPolyLine({0,0, 0,100, 100,100, 100,0, 0,0})
 
  drawPolyLine({0,0, 0,100, 100,100, 100,0, 0,0})
 +
</syntaxhighlight>
 
and
 
and
 +
<syntaxhighlight lang="lua">
 
  drawRect(0,0,100,100)
 
  drawRect(0,0,100,100)
 +
</syntaxhighlight>
 
do the same. If there are multiple argument (which can be 4 elements list to represent lines), each list has to contain an even number of element.
 
do the same. If there are multiple argument (which can be 4 elements list to represent lines), each list has to contain an even number of element.
 
*'''drawRect'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long
 
*'''drawRect'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long
30

edits

Navigation menu