Difference between revisions of "love.graphics.transformPoint"

(Created page)
 
m
Line 2: Line 2:
 
Converts the given 2D position from global coordinates into screen-space.
 
Converts the given 2D position from global coordinates into screen-space.
  
This effectively applies the current graphics transformations to the given position. A similar [[Transform:transformPoint]] method exists for Transform objects.
+
This effectively applies the current graphics transformations to the given position. A similar [[Transform:transformPoint]] method exists for [[Transform]] objects.
  
 
== Function ==
 
== Function ==

Revision as of 22:31, 26 January 2018

Available since LÖVE 0.11.0
This function is not supported in earlier versions.

Converts the given 2D position from global coordinates into screen-space.

This effectively applies the current graphics transformations to the given position. A similar Transform:transformPoint method exists for Transform objects.

Function

Synopsis

screenX, screenY = love.graphics.transformPoint( globalX, globalY )

Arguments

number globalX
The x component of the position in global coordinates.
number globalY
The y component of the position in global coordinates.

Returns

number screenX
The x component of the position with graphics transformations applied.
number screenY
The y component of the position with graphics transformations applied.

See Also


Other Languages