XORing pixels

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
prowave
 
Posts: 3
Joined: Sat Aug 29, 2015 12:01 pm

XORing pixels

Post by prowave »

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

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: XORing pixels

Post by Franklin97355 »

Which library and what errors are you getting?

User avatar
prowave
 
Posts: 3
Joined: Sat Aug 29, 2015 12:01 pm

Re: XORing pixels

Post by prowave »

The function "writeRegister" is found in the "AdafruitTFTLCD.cpp" within the "drawPixel" function.

User avatar
prowave
 
Posts: 3
Joined: Sat Aug 29, 2015 12:01 pm

Re: XORing pixels

Post by prowave »

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.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: XORing pixels

Post by Franklin97355 »

Take a look in pin_magic.h

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”