lorenzo906 / m2tklib

Automatically exported from code.google.com/p/m2tklib
0 stars 0 forks source link

position of XBMLABELP in an XYLIST can not be set as other elements like BUTTON or LABEL #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Open the Helloworld example of m2tklib
2. replace the M2_LABEL with M2_XBMLABELP and add a parent element of XYLIST
3. set the format of M2_XBMLABELP as "x64y32"

What is the expected output? What do you see instead?

If the format is "x0y0", the xbm is printed at the bottom-left of the screen.
Since the resolution of the screen is 128*64, I suppose to see the bottom-left 
of the xbm at the middle of the screen, with a format string of "x64y32". But 
the picture moved only several pixels up and right.

What version of the product are you using? On what operating system?

atmega2560
arduino-1.0.3
m2tklib_arduino_u8g_1.10
u8glib_arduino_v1.12
U8GLIB_SSD1306_128X64 u8g(52,51,12,10,11);

Please provide any additional information below.

The origin of coordinates in u8glib is at the top left of the screen, but it 
seems the origin is at the bottom left in m2tklib (using M2_BUTTON, M2_LABEL, 
etc.), what makes the difference?

Original issue reported on code.google.com by zhang1z...@gmail.com on 10 Jun 2013 at 7:56

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting this. This is a real bug.
This is now fixed in the current version of m2elxbm.c.

Hotfix: Download m2elxbm.c from here: 
http://m2tklib.googlecode.com/hg/src/m2elxbm.c
and replace the original m2elxbm.c in the utility folder.

Original comment by olikr...@gmail.com on 10 Jun 2013 at 6:30

GoogleCodeExporter commented 8 years ago
thank you for your quick reply.

Original comment by zhang1z...@gmail.com on 11 Jun 2013 at 3:42

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 3 Nov 2013 at 6:55