Difference between revisions of "Scäle"

(Created page with "{{#set:LOVE Version=0.7.x}} {{#set:Description=Scales graphics to correct aspect ratio for any resolution.}} Category:Libraries Scäle is a library that scales graphics to l...")
 
Line 10: Line 10:
  
 
scale_circle( mode, x, y, radius, segments )
 
scale_circle( mode, x, y, radius, segments )
 +
 
scale_rectangle( mode, x, y, width, height )
 
scale_rectangle( mode, x, y, width, height )
 +
 
scale_draw( drawable, x, y, r, sx, sy, ox, oy )
 
scale_draw( drawable, x, y, r, sx, sy, ox, oy )
 +
 
scale_line( x1, y1, x2, y2, ... )
 
scale_line( x1, y1, x2, y2, ... )
 +
 
scale_point( x, y )
 
scale_point( x, y )
 +
 
scale_polygon( mode, x1, y1, x2, y2, ... )
 
scale_polygon( mode, x1, y1, x2, y2, ... )
 +
 
scale_triangle( mode, x1, y1, x2, y2, x3, y3 )
 
scale_triangle( mode, x1, y1, x2, y2, x3, y3 )
  

Revision as of 23:14, 13 March 2011


Scäle is a library that scales graphics to look right at any resolution. Graphics are always the same distance from the center of the screen no matter what the horizontal resolution, and things zoom in or out based on the vertical resolution.

To use Scäle, replace love.graphics calls with Scäle's counterparts. Draw graphics where you would want them in an 800x600 window.

The functions currently included:

scale_circle( mode, x, y, radius, segments )

scale_rectangle( mode, x, y, width, height )

scale_draw( drawable, x, y, r, sx, sy, ox, oy )

scale_line( x1, y1, x2, y2, ... )

scale_point( x, y )

scale_polygon( mode, x1, y1, x2, y2, ... )

scale_triangle( mode, x1, y1, x2, y2, x3, y3 )

All arguments are the same as their love.graphics counterparts.

Download the library here! http://tesselode.110mb.com/files/love/scale.lua