Changes

Jump to navigation Jump to search

platform.gc

2 bytes added, 01:07, 25 May 2011
no edit summary
Line 1: Line 1:  
Returns a dummy [[:Category:gc|graphics context]].<br />
 
Returns a dummy [[:Category:gc|graphics context]].<br />
   −
As a consequence, you are able to use the functions made for the "normal" [[:Category:gc|gc]]
+
As a consequence, you are able to use the functions made for the "normal" [[:Category:gc|gc]].
    
It is typically used to measure pixel lengths and heights of strings when a normal graphics context is not available.<br />
 
It is typically used to measure pixel lengths and heights of strings when a normal graphics context is not available.<br />
Line 9: Line 9:  
<br />
 
<br />
   −
Here is an example of using the dummy graphics context to get the pixel length and height of a string.
+
Here is an example of using the dummy graphics context to get the pixel length and height of a string :
 
<syntaxhighlight>local gc = platform.gc()                    -- Get the dummy graphics context
 
<syntaxhighlight>local gc = platform.gc()                    -- Get the dummy graphics context
 
gc:begin()                                  -- Makes it the current graphics context
 
gc:begin()                                  -- Makes it the current graphics context

Navigation menu