Difference between revisions of "love.graphics.translate"

(Like on the scale page, important to know.)
Line 25: Line 25:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Translates the coordinate system in two dimensions.}}
 
{{#set:Description=Translates the coordinate system in two dimensions.}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.translate}}
 
{{i18n|love.graphics.translate}}

Revision as of 10:21, 25 March 2011

Translates the coordinate system in two dimensions.

When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy.

Scale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.

This change lasts until love.draw() exits.

Function

Synopsis

love.graphics.translate( dx, dy )

Arguments

number dx
The translation relative to the x-axis.
number dy
The translation relative to the y-axis.

Returns

Nothing.

See Also


Other Languages