Difference between revisions of "love.graphics.applyTransform"
(Created page) |
Mathurinfr (talk | contribs) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{newin|[[ | + | {{newin|[[11.0]]|110|type=function}} |
Applies the given [[Transform]] object to the current coordinate transformation. | Applies the given [[Transform]] object to the current coordinate transformation. | ||
Line 17: | Line 17: | ||
== Examples == | == Examples == | ||
<source lang="lua"> | <source lang="lua"> | ||
− | local transform = love. | + | local transform = love.math.newTransform() |
− | + | transform:translate(200, 0) | |
function love.draw() | function love.draw() | ||
Line 31: | Line 31: | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
− | * [[ | + | * [[love.math.newTransform]] |
* [[love.graphics.replaceTransform]] | * [[love.graphics.replaceTransform]] | ||
* [[love.graphics.push]] | * [[love.graphics.push]] |
Latest revision as of 16:55, 1 May 2018
Available since LÖVE 11.0 |
This function is not supported in earlier versions. |
Applies the given Transform object to the current coordinate transformation.
This effectively multiplies the existing coordinate transformation's matrix with the Transform object's internal matrix to produce the new coordinate transformation.
Function
Synopsis
love.graphics.applyTransform( transform )
Arguments
Transform transform
- The Transform object to apply to the current graphics coordinate transform.
Returns
Nothing.
Examples
local transform = love.math.newTransform()
transform:translate(200, 0)
function love.draw()
love.graphics.translate(100, 100)
love.graphics.rectangle("fill", 0, 0, 50, 50)
love.graphics.applyTransform(transform)
love.graphics.rectangle("fill", 0, 0, 50, 50)
end
See Also
- love.graphics
- love.math.newTransform
- love.graphics.replaceTransform
- love.graphics.push
- love.graphics.pop
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info