09-06-2012 04:18 PM
Using NDK Beta 2.1
I want to draw some text on the screen and in a pixmap buffer.
Looked at the helloworld example and it takes ALOT of code just to print a simple text.
Is there any other way to do this without using the bbutil functions or OpenGL?
If I must use bbutil how would I draw text in offscreen buffer?
09-07-2012 11:33 AM - edited 09-07-2012 11:34 AM
There is another option: using skia lib
It also contain an example app for how to use skia lib on playbook.
( Note: you can not use QImage/QPainter to draw text at this moment, because you don't have access to QFont)
Currently, the NDK has a bug for Skia lib, e.g.: it has pre-built Skia lib but does not include the header files. Thereby, you will need to build Skia lib by your self ( the github has the instruction how to build the lib in NDK) and bundle it with your app to override the one on the target.
09-07-2012 12:26 PM
Thanks. Seems to be alot of work just to do simple stuff.
Why can't we have more native graphics API like simple drawing funcs instead using 3rd party libraries?
I guess I will have to deal with Cascade.
09-07-2012 12:27 PM
Use either OpenGL or Qt.
>If I must use bbutil how would I draw text in offscreen buffer?
what do you mean?
The only way to draw text on the screen is with the bbutil functions or you write your own, correct?
I want to draw some text into a pixmap buffer and then display it on the screen.