Changes

Jump to navigation Jump to search

image.rotate

12 bytes added, 22:30, 6 June 2012
Line 22: Line 22:     
== Example  ==
 
== Example  ==
<syntaxhighlight>local imw = earth:width()
+
<syntaxhighlight>local sc = 0.15
 +
local imw = earth:width()
 
local imh = earth:height()
 
local imh = earth:height()
 
local im = earth:copy(sc*imw, sc*imh)
 
local im = earth:copy(sc*imw, sc*imh)
Line 30: Line 31:  
local x = w/4 - midx
 
local x = w/4 - midx
 
local y = h/2 - midy
 
local y = h/2 - midy
gc:drawImage(im, x, y) -- we must be in a gc-passed function (like [[on.paint]](gc))
+
gc:drawImage(im, x, y) -- we must be in a gc-passed function (like on.paint(gc))
 
imw, imh = im:width(), im:height()</syntaxhighlight>
 
imw, imh = im:width(), im:height()</syntaxhighlight>
  

Navigation menu