Updated doc/api.md for color functions and graphics.draw() changes

This commit is contained in:
rxi
2016-09-24 09:14:16 +01:00
parent e52457435a
commit 1d4cdae599

View File

@@ -48,15 +48,17 @@ Returns the height of the screen in pixels.
##### love.graphics.getBackgroundColor() ##### love.graphics.getBackgroundColor()
Returns the currently set background color. Returns the currently set background color.
##### love.graphics.setBackgroundColor([red [, green [, blue]]]) ##### love.graphics.setBackgroundColor(red, green, blue)
Sets the the background color used when `love.graphics.clear()` is called Sets the the background color used when `love.graphics.clear()` is called
without any arguments. without any arguments. If called with no arguments the back color is set to
black.
##### love.graphics.getColor() ##### love.graphics.getColor()
Returns the currently set color. Returns the currently set color.
##### love.graphics.setColor([red [, green [, blue]]]) ##### love.graphics.setColor(red, green, blue)
Sets the the color used when drawing. Sets the the color used when drawing. If called with no arguments the color is
set to white.
##### love.graphics.getBlendMode() ##### love.graphics.getBlendMode()
Returns the currently set blend mode. Returns the currently set blend mode.
@@ -98,11 +100,11 @@ passed then this is set to false by default.
Resets the font, color, background color, canvas, blend mode and flip mode to Resets the font, color, background color, canvas, blend mode and flip mode to
their defaults. their defaults.
##### love.graphics.clear([color]) ##### love.graphics.clear(red, green, blue)
Clears the screen (or canvas) to the `color`. If no `color` argument is given Clears the screen (or canvas) to the color. If no color argument is given
then the background color is used. then the background color is used (see `love.graphics.setBackgroundColor()`).
##### love.graphics.draw(image [, quad], x, y) ##### love.graphics.draw(image [, quad [, x [, y]]])
Draws the `image` to the screen at the given `x`, `y` position. If a `quad` Draws the `image` to the screen at the given `x`, `y` position. If a `quad`
argument is provided then the image is clipped to the provided quad when drawn. argument is provided then the image is clipped to the provided quad when drawn.