m6023m / glcd-arduino

Automatically exported from code.google.com/p/glcd-arduino
0 stars 0 forks source link

Description InvertRect is wrong #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Description says:
right edge at x+width-1
bottom edge at y+hight-1
This is wrong. Correct version is:
right edge at x+width
bottom edge at y+hight

In fact, this procedure behaves consistently with DrawRect.

Original issue reported on code.google.com by olikr...@gmail.com on 20 Jun 2011 at 9:41

GoogleCodeExporter commented 8 years ago
all the +1/-1 width stuff is a total pain. It is based on the JAVA and c# 
functions.
Michael and I went round and round on this stuff.
IMHO the SUN guys did things way more complex than they needed to for aliasing 
support which does not apply for monochrome displays. Also, they are not even 
consistent on certain functions.

Best thing to do at this point is probably to just document how it really works.
I'll have to go back and do a bit of testing to reverify each of the functions.

Original comment by bperry...@gmail.com on 30 Jun 2011 at 10:25

GoogleCodeExporter commented 8 years ago
thanks... the best would be if the documentation matches the real behavior.
in my own project i have the origin at lower left and the top right corner at 
x+width-1 and y+height-1

a pain to get these things translated... but... ok...
See m2_gh_glcd_draw_frame at
http://code.google.com/p/m2tklib/source/browse/dev/glcd/m2ghglcdutil.cpp

but still: good and reliable graphics interface! Works without big issues.
Thanks for fixing!

Oliver

Original comment by olikr...@gmail.com on 30 Jun 2011 at 3:34