gb.display.setColor

From Gamebuino Wiki
Revision as of 2015-04-06T10:52:39 by Rodot (talk | contribs) (gray added)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Changes the color used to draw on the screen by all the display functions.

The colors can be either WHITE, BLACK, GRAY or INVERT.

Most of the display functions only have one color, the foreground color. But some functions also have a background color:

INVERT color won't work with the drawCircle and fillCircle function, because the algorithm they use passes several times over the same pixel, so the color will toggle several times and be inconsistent.

Syntax

gb.display.setColor(foregroundColor, backgroundColor);

Parameters

  • foregroundColor : WHITE, BLACK, GRAY or INVERT
  • backgroundColor (optional) : WHITE, BLACK, GRAY or INVERT. If no background color is specified, the background is transparent.

Returns

none

Example

See also