ARDUINO UNO w/Adafruit 2.8" TFTLCD

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
KORHAEO
 
Posts: 3
Joined: Wed Nov 09, 2011 8:52 pm

ARDUINO UNO w/Adafruit 2.8" TFTLCD

Post by KORHAEO »

Using tft.FillTriangle() in Adafruit TFTLCD library:

Problem:

We are using left and right facing triangles as decrement/increment buttons.

Cannot fill a right facing triangle after calling tft.FillTriangle().
Most of the display will fill instead.

Drawing the triangle works fine.
Left facing triangles will fill fine no matter where they are placed on the display

Code Snippet:

//Draw and Fill Right advance button
tft.drawTriangle(tft.width()/10, tft.height()/10+6*i,
tft.width()/10-i, tft.height()/10+4*i,
tft.width()/10+i, tft.height()/10+4*i, BLACK);
tft.fillTriangle(tft.width()/10, tft.height()/10+6*i,
tft.width()/10-i, tft.height()/10+4*i,
tft.width()/10+i, tft.height()/10+4*i, BLACK);

Any Ideas?
Attachments
Noname.jpg
Noname.jpg (15.31 KiB) Viewed 681 times

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: ARDUINO UNO w/Adafruit 2.8" TFTLCD

Post by adafruit_support_bill »

Hmmm. Sounds like a bug in the fill algorithm. Does it make a difference if you specify the vertices in clockwise vs. counter-clockwise order?

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

Return to “Arduino”