Difference between revisions of "love.graphics.setScissor"

m (It can in fact do both.)
Line 2: Line 2:
 
Sets or disables scissor.
 
Sets or disables scissor.
  
The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including [[love.graphics.clear]].
+
The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including [[love.graphics.clear]].
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
love.graphics.setScissor( )
+
love.graphics.setScissor( x, y, width, height )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
None.
+
{{param|number|x|x coordinate of upper left corner.}}
 +
{{param|number|y|y coordinate of upper left corner.}}
 +
{{param|number|width|width of clipping rectangle.}}
 +
{{param|number|height|height of clipping rectangle.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
Line 15: Line 18:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
love.graphics.setScissor( x, y, width, height )
+
love.graphics.setScissor( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|x|x coordinate of upper left corner.}}
+
None.
{{param|number|y|y coordinate of upper left corner.}}
 
{{param|number|width|width of clipping rectangle.}}
 
{{param|number|height|height of clipping rectangle.}}
 
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 +
=== Notes ===
 +
Disables scissor.
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]

Revision as of 11:00, 16 October 2012

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

Sets or disables scissor.

The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear.

Function

Synopsis

love.graphics.setScissor( x, y, width, height )

Arguments

number x
x coordinate of upper left corner.
number y
y coordinate of upper left corner.
number width
width of clipping rectangle.
number height
height of clipping rectangle.

Returns

Nothing.

Function

Synopsis

love.graphics.setScissor( )

Arguments

None.

Returns

Nothing.

Notes

Disables scissor.

See Also


Other Languages