Changes

Jump to navigation Jump to search

Category:gc

331 bytes added, 15:43, 17 December 2013
Line 1: Line 1:  
== Quick Overview==
 
== Quick Overview==
*'''[[gc:begin]]''' -
+
 
 +
'''gc''' is the Nspire's ''graphic context''. A graphics context is a module that has a handle to the script’s graphics output window and a library of graphics routines that are used to draw on the window. A graphics context is supplied to the script ”on.paint” event handler each time the window needs to be redrawn. The graphics context employs a pixel-based coordinate system with the origin in the upper left corner of the drawing window.
 +
 
 
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.
 
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.
 
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).
 
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).
Line 11: Line 13:  
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]
 
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]
 
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]
 
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]
*'''[[gc:finish]]''' -
   
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.
 
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.
 
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width
 
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width
*'''[[gc:isColorDisplay]]''' Bool (Read-only) Returns 1 if the device has a color display, 0 if not.
+
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency. ''Not available anymore''
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency.
   
*'''[[gc: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.
 
*'''[[gc: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)
 
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, "thick"}, smoothness {“smooth”, "dotted", "dashed"}
 
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, "thick"}, smoothness {“smooth”, "dotted", "dashed"}
 
<br>
 
<br>

Navigation menu