TftReadPixel()

Library Description ›› System ››
 visits
Parent Previous Next

Syntax

TftReadPixel(wX_Pixel As Word, wY_Pixel As Word), Word

Parameters

Parameter

Description

wX_Pixel

X-coordinate

wY_Pixel

Y-coordinate

Return value

16-bit RGB565 color

Overview

This procedure reads a pixel at position (wX_Pixel, wY_Pixel) from the TFT screen's graphic RAM and returns its color.

Note: TFT GRAM readback is interface- and controller-dependent. On supported SPI variants, the library temporarily switches to a single-wire read sequence on the MOSI/SDA line, so pixel reads are considerably slower than writes.
Some controller/interface combinations do not provide GRAM readback; in those cases the routine returns 0.

Example

TftReadPixel(20,30)

Created with the Personal Edition of HelpNDoc: Elevate Your CHM Help Files with HelpNDoc's Advanced Customization Options