Changes

Jump to navigation Jump to search

Overview of the API

57 bytes added, 23:55, 30 May 2011
Line 96: Line 96:  
The maximum screen resolution available to Lua programs is 318 by 212 pixels.
 
The maximum screen resolution available to Lua programs is 318 by 212 pixels.
   −
*'''[[begin]]''' -
+
*'''[[gc:begin]]''' -
*'''[[clipRect]]''' -
+
*'''[[gc:clipRect]]''' -
*'''[[drawArc]]'''(x, y, width, height, start angle, finish angle) Note, to draw a circle, use drawArc(x - diameter/2, y - diameter/2, diameter,diameter,0,360) where x and y are the coordinates of the middle.
+
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle) Note, to draw a circle, use drawArc(x - diameter/2, y - diameter/2, diameter,diameter,0,360) where x and y are the coordinates of the middle.
*'''[[drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.
+
*'''[[gc:drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.
*'''[[drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)
+
*'''[[gc:drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)
*'''[[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.
+
*'''[[gc: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">
 
<syntaxhighlight lang="lua">
Line 111: Line 111:  
</syntaxhighlight>
 
</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
+
*'''[[gc: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
*'''[[drawString]]'''(string, x, y, PositionString) PositionString is the string’s anchor point and can be “bottom”, “middle”, or “top”.  
+
*'''[[gc:drawString]]'''(string, x, y, PositionString) PositionString is the string’s anchor point and can be “bottom”, “middle”, or “top”.  
*'''[[fillArc]]'''(x, y, width, height, start angle, finish angle) see drawArc
+
*'''[[gc:fillArc]]'''(x, y, width, height, start angle, finish angle) see drawArc
*'''[[fillPolygon]]'''(int list1 [,int list2, .., int listN]) see drawPolyLine
+
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see drawPolyLine
*'''[[fillRect]]'''(x, y, width, height) see drawRect
+
*'''[[gc:fillRect]]'''(x, y, width, height) see drawRect
*'''[[finish]]''' -
+
*'''[[gc:finish]]''' -
*'''[[getStringHeight]]'''(string)
+
*'''[[gc:getStringHeight]]'''(string)
*'''[[getStringWidth]]'''(string)
+
*'''[[gc:getStringWidth]]'''(string)
*'''[[isColorDisplay]]''' Bool (Read-only) Returns 1 if color, 0 if not.
+
*'''[[gc:isColorDisplay]]''' Bool (Read-only) Returns 1 if color, 0 if not.
*'''[[setAlpha]]'''(int) - where the argument is an int between 0 and 255. Sets the transparency.
+
*'''[[gc:setAlpha]]'''(int) - where the argument is an int between 0 and 255. Sets the transparency.
*'''[[setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.
+
*'''[[gc:setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.
*'''[[setFont]]'''(font, type, size), with font : {“sansserif”, "serif", ..}, type {“b”, “r”, “i”}, size(int)
+
*'''[[gc:setFont]]'''(font, type, size), with font : {“sansserif”, "serif", ..}, type {“b”, “r”, “i”}, size(int)
*'''[[setPen]]'''(size, smooth) size {“thin”, “medium”, "thick"}, smooth {“smooth”, "dotted", "dashed"}
+
*'''[[gc:setPen]]'''(size, smooth) size {“thin”, “medium”, "thick"}, smooth {“smooth”, "dotted", "dashed"}
    
==platform==
 
==platform==

Navigation menu