Sets the texture coordinates according to a viewport.

== Function ==
=== Synopsis ===
<source lang="lua">
Quad:setViewport( x, y, w, h, sw, sh )
</source>
=== Arguments ===
{{param|number|x|The top-left corner along the x-axis.}}
{{param|number|y|The top-left corner along the y-axis.}}
{{param|number|w|The width of the viewport.}}
{{param|number|h|The height of the viewport.}}
{{New feature|0.9.0|
{{param|number|sw|The reference width, the width of the [[Image]]. (Must be greater than 0.)}}
{{param|number|sh|The reference height, the height of the [[Image]]. (Must be greater than 0.)}}
}}
=== Returns ===
Nothing.

== See Also ==
* [[parent::Quad]]
* [[Quad:getViewport]]
[[Category:Functions]]
{{#set:Description=Sets the texture coordinates according to a viewport.}}
{{#set:Since=000}}

== Other Languages ==
{{i18n|Quad:setViewport}}