In order to draw an element and then erase it without affecting the previous graphic element I would like to paint a pixel by XORing it's current color. In looking at the graphics library there is a function call using "writeRegister" where the location and color of a pixel is sent to the display hardware. I assume that there is a "readRegister" function for determining the pixel color at a specific x and y location. In trying to use either function call I receive a compile error. Where can I find the header file that defines the functions? I have searched to no avail.
Thank you,
B.Clausen
XORing pixels
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: XORing pixels
Which library and what errors are you getting?
- prowave
- Posts: 3
- Joined: Sat Aug 29, 2015 12:01 pm
Re: XORing pixels
The function "writeRegister" is found in the "AdafruitTFTLCD.cpp" within the "drawPixel" function.
- prowave
- Posts: 3
- Joined: Sat Aug 29, 2015 12:01 pm
Re: XORing pixels
Sorry I didn't include the correct function and error message. Function is "writeRegister15()" and the error message is "'writeRegister16' was not declared in this scope". I assume then that the declaration in my header of #include <Adafruit_TFTLCD.h> // Hardware-specific library is not sufficient and the function is declared else where.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: XORing pixels
Take a look in pin_magic.h
Please be positive and constructive with your questions and comments.