|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Changes a pixel on the graph screen.
PxlChg row, column
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
The PxlChg command inverts a pixel on the graph screen: drawing it if it was erased, and erasing it otherwise. It uses pixel coordinates, which means that the result isn't affected by window variables like xmin and xmax: PxlChg P, Q will always change the pixel P rows down and Q columns across from the top left corner of the graph screen.
The range of possible values (anything outside this range will give an error) is:
- 0..76 for the row and 0..158 for the column, on a TI-89 or TI-89 Titanium.
- 0..102 for the row and 0..238 for the column, on a TI-92, TI-92 Plus, or Voyage 200.
Note that this doesn't match the output of getConfg() — the command is reliable for figuring out which of the two situations you're in, but the values it gives for window width/height are incorrect.
When in split screen mode, PxlChg still won't give an error as long as the values are in the regular range, but drawing a pixel off the screen will have no effect. The output of getConfg() will reflect the change in window size, but the values themselves still won't be correct.
In practice, PxlChg is the most useful of the pixel-toggling commands, because it can be used both to draw and to erase pixels.
Advanced Uses
PxlChg can also be used with two lists of the same size. In that case, it will change the pixels for every pair of elements (rowlist[n], collist[n]). This is a rarely-used alternative to a command like XorPic, with the one advantage that it doesn't require a picture variable (of course, if you had two such lists, you could easily use NewPic to create a picture variable).
Error Conditions
260 - Domain error happens when the pixel coordinates are not in the allowed range.
