Difference between revisions of "love.graphics.setScissor"

m (Add intersectScissor to See Also)
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
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]].
 +
 
 +
The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...).
 
== Function ==
 
== Function ==
 +
Limits the drawing area to a specified rectangle.
 
=== 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.
 
== Function ==
 
== Function ==
 +
Disables scissor.
 
=== 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.
Line 26: Line 30:
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
* [[love.graphics.getScissor]]
 
* [[love.graphics.getScissor]]
 +
* [[love.graphics.intersectScissor]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Disables scissor.}}
+
{{#set:Description=Sets or disables scissor.}}
 +
{{#set:Since=040}}
 +
{{#set:PrettySince=[[0.4.0]]}}
 +
{{#set:Sub-Category=State}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.setScissor}}
 
{{i18n|love.graphics.setScissor}}

Revision as of 01:06, 13 June 2016

Sets or disables scissor.

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

The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...).

Function

Limits the drawing area to a specified rectangle.

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

Disables scissor.

Synopsis

love.graphics.setScissor( )

Arguments

None.

Returns

Nothing.

See Also



Other Languages