Difference between revisions of "love.graphics.reset"

m
m
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
Resets the current graphics settings.
 
Resets the current graphics settings.
  
Calling reset makes the current drawing color white, the current background color black, and removes any scissor settings. It sets the [[BlendMode]] to <tt>alpha</tt> and [[ColorMode]] to <tt>modulate.</tt> It also sets both the point and line drawing modes to <tt>smooth</tt> and their sizes to <tt>1.0</tt> . Finally, it removes any stipple settings.
+
Calling reset makes the current drawing color white, the current background color black, disables any active [[Canvas]] or [[Shader]], and removes any scissor settings. It sets the [[BlendMode]] to <tt>alpha</tt>, enables all [[love.graphics.setColorMask|color component masks]], disables [[love.graphics.setWireframe|wireframe mode]] and resets the current graphics transformation to the [[love.graphics.origin|origin]]. It also sets both the point and line drawing modes to <tt>smooth</tt> and their sizes to <tt>1.0</tt>.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 11: Line 11:
 
=== Returns ===
 
=== Returns ===
 
Nothing
 
Nothing
 +
== Notes ==
 +
This function, like any other function that change graphics state, only affects the current stack. Calling [[love.graphics.pop]] will restore the previous transformation stack or the whole graphics settings, depending on how [[love.graphics.push]] was called.
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
* [[love.graphics.setBackgroundColor]]
 
* [[love.graphics.setBackgroundColor]]
 
* [[love.graphics.setColor]]
 
* [[love.graphics.setColor]]
* [[love.graphics.setLineStipple]]
 
 
* [[love.graphics.setLineStyle]]
 
* [[love.graphics.setLineStyle]]
 
* [[love.graphics.setPointStyle]]
 
* [[love.graphics.setPointStyle]]
 +
* [[love.graphics.origin]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Resets the current graphics settings.}}
 
{{#set:Description=Resets the current graphics settings.}}
 +
{{#set:Since=000}}
 +
{{#set:Sub-Category=State}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.reset}}
 
{{i18n|love.graphics.reset}}

Latest revision as of 04:08, 18 June 2020

Resets the current graphics settings.

Calling reset makes the current drawing color white, the current background color black, disables any active Canvas or Shader, and removes any scissor settings. It sets the BlendMode to alpha, enables all color component masks, disables wireframe mode and resets the current graphics transformation to the origin. It also sets both the point and line drawing modes to smooth and their sizes to 1.0.

Function

Synopsis

love.graphics.reset( )

Arguments

None

Returns

Nothing

Notes

This function, like any other function that change graphics state, only affects the current stack. Calling love.graphics.pop will restore the previous transformation stack or the whole graphics settings, depending on how love.graphics.push was called.

See Also


Other Languages