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...") |
(This library is so glitchy no one should use it) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#set:LOVE Version=0.7.x}} | {{#set:LOVE Version=0.7.x}} | ||
{{#set:Description=Scales graphics to correct aspect ratio for any resolution.}} | {{#set:Description=Scales graphics to correct aspect ratio for any resolution.}} | ||
− | |||
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. | 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. | ||
Line 10: | Line 9: | ||
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 ) | ||
Line 20: | Line 25: | ||
Download the library here! | Download the library here! | ||
− | http://tesselode | + | http://tesselode.com/files/libraries/scale.lua |
Latest revision as of 20:41, 31 July 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.com/files/libraries/scale.lua