Hi,
I’m trying to implement some low level functions to realise my JAVA APP on my hareware platform. As the photo showed below, I want to put a string on my screen with calling the JAVA API drawString(), but the string didn’t appear after my fireware ran, could you tell me what the matched C code function is to show the string?
Thank you for your advices, I success to draw a fill rectangle on my screen, but fail to draw a string at (0, 0). What’s the matter? In addition, how to check the graphic context clip?
It was correctly showed on the SDK simulator, but wrong on my board.
I checked the 4 java functions you mentioned above, return value in turn is 0, 0, 480 and 272. And what’s the relationship between drawing string and clipping zone?
Additionally, my board is not your recommended, the lcd’s resolution on my board is 1024*600, and the value of g.getClipWidth() and g.getClipHeight() is in turn 1024 and 600.
Have you linked the font(s) with the MicroEJ application or not ? In another words, do you have implemented the external resources (LLEXT_impl.h) and do you have put the font (*.ejf_raw) file(s) in this external memory ?
If yes, is it possible to link the font(s) with the application and retry your test ? I would like to exclude the “external resources” use case.
I may have another idea, could you send your .ejf file(s) and fonts.list file(s)?
Or could you check that you embed the right characters, if not we would print the first character embedded, if it is an empty character you would end up with your bug.
An external resource is a resource which is not linked with the MicroEJ application. This kind of resources is often located in a SDCard. The LLAPI LLExt_impl.h allows to the MicroEJ application to access them; without explicitly use a file system in the application.
The idea is to be sure about the font used to render the string. Before calling gc.drawString(), you have to set a font calling gc.setFont(). If not set, the default font is used. You can check the font characteristics calling gc.getFont().getDescriptor() just before gc.drawString()