gb.display.getPixel

From Gamebuino Wiki
Revision as of 2014-06-24T18:26:08 by Rodot (talk | contribs) (Created page with "{{lowercase}} __NOTOC__ == Description == Read the color of the pixel stored in the display buffer at the given coordinates. == Syntax == <pre>gb.display.getPixel(x, y);</pre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Read the color of the pixel stored in the display buffer at the given coordinates.

Syntax

gb.display.getPixel(x, y);

Parameters

  • x: horizontal coordinate. Should be between 0 (left of the display) and LCDWIDTH (right of the display)
  • y: vertical coordinate. Should be between 0 (top of the display) and LCDHEIGHT (bottom of the display)

Returns

  • color of the pixel. 0 for WHITE and 1 for BLACK.

Example

See also