{{newin|[[11.0]]|110|type=function}}
Creates a new [[Transform]] object.

== Function ==
Creates a Transform with no transformations applied. Call methods on the returned object to apply transformations.
=== Synopsis ===
<source lang="lua">
transform = love.math.newTransform( )
</source>
=== Arguments ===
None.

=== Returns ===
{{param|Transform|transform|The new Transform object.}}

== Function ==
Creates a Transform with the specified transformation applied on creation.
=== Synopsis ===
<source lang="lua">
transform = love.math.newTransform( x, y, angle, sx, sy, ox, oy, kx, ky )
</source>
=== Arguments ===
{{param|number|x|The position of the new Transform on the x-axis.}}
{{param|number|y|The position of the new Transform on the y-axis.}}
{{param|number|angle (0)|The orientation of the new Transform in radians.}}
{{param|number|sx (1)|Scale factor on the x-axis.}}
{{param|number|sy (sx)|Scale factor on the y-axis.}}
{{param|number|ox (0)|Origin offset on the x-axis.}}
{{param|number|oy (0)|Origin offset on the y-axis.}}
{{param|number|kx (0)|Shearing / skew factor on the x-axis.}}
{{param|number|ky (0)|Shearing / skew factor on the y-axis.}}
=== Returns ===
{{param|Transform|transform|The new Transform object.}}

== Examples ==
Creates a new Transform object and uses it to position and rotate a rectangle around its center.
<source lang="lua">
function love.load()
    rectwidth = 100
    rectheight = 100

    -- arguments are: x, y, angle, scalex, scaley, offsetx, offsety
    transform = love.math.newTransform(100, 100, math.pi/4, 1, 1, rectwidth / 2, rectheight / 2)
end

function love.draw()
    love.graphics.applyTransform(transform)
    love.graphics.rectangle("fill", 0, 0, rectwidth, rectheight)
end
</source>
== See Also ==
* [[parent::love.math]]
* [[Constructs::Transform]]
[[Category:Functions]]
{{#set:Description=Creates a new [[Transform]] object.}}
== Other Languages ==
{{i18n|love.math.newTransform}}