Difference between revisions of "Canvas:clear"

(Adds explanation of renaming)
Line 1: Line 1:
{{newin|[[0.8.0]]|080|type=function|text=It was renamed from Framebuffer:clear() in that version.}}
+
{{newin|[[0.8.0]]|080|type=function|text=It has been renamed from [[Framebuffer:clear]]}}
 
Clears content of a [[Canvas]].
 
Clears content of a [[Canvas]].
  
Line 35: Line 35:
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::Canvas]]
 
* [[parent::Canvas]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Clears content of a Canvas.}}
 
{{#set:Description=Clears content of a Canvas.}}
{{#set:Since=080}}
 
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Canvas:clear}}
 
{{i18n|Canvas:clear}}

Revision as of 22:55, 5 February 2012

Available since LÖVE 0.8.0
It has been renamed from Framebuffer:clear.

Clears content of a Canvas.

When called without arguments, the Canvas will be cleared with color rgba = {0,0,0,0}, i.e. it will be fully transparent. If called with color parameters (be it numbers or a color table), the alpha component may be omitted in which case it defaults to 255 (fully opaque).

Function

Synopsis

Canvas:clear( )

Arguments

None.

Returns

Nothing.

Function

Synopsis

Canvas:clear( red, green, blue, alpha )

Arguments

number red
Red component of the clear color (0-255).
number green
Green component of the clear color (0-255).
number blue
Blue component of the clear color (0-255).
number alpha (255)
Alpha component of the clear color (0-255).

Returns

Nothing.

Function

Synopsis

Canvas:clear( rgba )

Arguments

table rgba
A numerical indexed table with the red, green, blue and alpha values as numbers (alpha may be ommitted).

Returns

Nothing.

See Also

Other Languages