TI-BASIC:Pxl Test

From Learn @ Cemetech
Revision as of 18:29, 24 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

PXL-TEST.GIF

Command Summary

Tests a pixel on the graph screen to see if it is on or off.

Command Syntax

pxl-Test(Y,X)

Menu Location

While editing a program press:

  1. 2nd PRGM to enter the DRAW menu
  2. RIGHT to enter the POINTS menu
  3. 7 to choose pxl-Test(, or use arrows

Calculator Compatibility

TI-83/84/+/SE

Token Size

1 byte

The pxl-Test( command is used to test a pixel at the given (Y,X) coordinates of the graph screen, to see whether it is on or off. One is returned if the pixel is on and zero is returned if the pixel is off. Please note that the coordinates are switched around so that the row comes first and then the column -- it's (Y,X) instead of (X,Y). This command's coordinates are independent of the window settings.

You can store the result of pxl-Test( to a variable for later use, or use the command in a conditional or loop.

:Pxl-On(25,25
:If pxl-Test(25,25
:Disp "Pixel turned on!

Error Conditions

  • ERR:DOMAIN is triggered if the coordinates are not whole numbers or not in the right range ([0..62] for row, [0..94] for column). These bounds are also affected by split screen mode.

Related Commands