Changes

Jump to navigation Jump to search

Changes in OS 3.2

14 bytes added, 15:39, 6 October 2013
m
Line 21: Line 21:  
* You can not use coordinates for drawing to the screen above/under (-) 32 000. (Be careful, some scripts might need to take that into account now, or they may crash)
 
* You can not use coordinates for drawing to the screen above/under (-) 32 000. (Be careful, some scripts might need to take that into account now, or they may crash)
 
* [[gc:clipRect]] doesn't have the ''intersect'' option anymore.
 
* [[gc:clipRect]] doesn't have the ''intersect'' option anymore.
* In [[platform.apilevel|apilevel]] 2.0, [[platform.gc]]() is removed and replaced with [[platform.withGC]](). An example of it:<br />  
+
* In [[platform.apilevel|apilevel]] 2.0, [[platform.gc]]() is removed and replaced with [[platform.withGC]](). Usage example:<br />  
    
<syntaxhighlight>function getHeightWidth(str, gc)
 
<syntaxhighlight>function getHeightWidth(str, gc)
Line 29: Line 29:  
end
 
end
 
height, width = platform.withGC(getHeightWidth, 'Hello World')</syntaxhighlight>
 
height, width = platform.withGC(getHeightWidth, 'Hello World')</syntaxhighlight>
So what it does it call the function you give as first argument and pass a dummy [[gc|GC]] (Graphics Context) to it.
+
What it does is calling the function you give as first argument, and additionally passing a dummy [[gc|GC]] (Graphics Context) to it.
    
==D2Editor==
 
==D2Editor==

Navigation menu