freetronics / FTOLED

Arduino software library to drive OLED display modules
http://www.freetronics.com/oled128
GNU General Public License v3.0
26 stars 18 forks source link

drawString draws a preceding line before x pos? #6

Closed gslender closed 8 years ago

gslender commented 9 years ago

Not sure why, but the code for drawString has these lines... which draw a line before the chars... not sure why and only makes it annoying because the bounding box isn't just X,Y, X + width, Y + height.... it is X-1,Y, X + width+1, Y + height.... ??????

  if(x >= 0)
    oled->drawLine(x-1 , y, x-1 , y + header.height - 1, background);
projectgus commented 8 years ago

Hi Grant,

Sorry for the slow reply. The reason for the lines after the first character is to erase any space between letters, to ensure clean gaps.

We shouldn't do it before the first character though, I think that's a bug. I'll look into it shortly.

Angus

projectgus commented 8 years ago

Thanks again for reporting this.

I've fixed that bug, and a couple of other bugs where background drawing seemed to be incorrect/ugly. Would appreciate any feedback if you still see pixels that are in the wrong place.

Angus