03-10-2013 03:02 PM
I need to create something like this:
The line should vary depending on consumption, everything else already calculated just need to know how to can draw.
Can you help?
Solved! Go to Solution.
03-10-2013 03:32 PM - edited 03-10-2013 03:37 PM
There are lots of graphics options to choose from it's up to you which one is the most appropriate for you.
If you are sticking with 2d then start with one of the vector libs, if you have a plan to maybe go 3d high-performance later on then maybe get in to openGL straight away.
If you asking about BB libraries that will do graphs for you on BB then I'm not aware of any but there are plenty out there both open source and paid that you could use (e.g boost, OGDF, etc).
Sorry, this is really a case of doing your homework and investigating all the options then jumping in to one. The first question to ask yourself is do it yourself or use 3rd party library?
If you really want to do it in an ImageView (I don't think this is the way to go) then investigate QPainter,
03-10-2013 03:41 PM - edited 03-10-2013 03:48 PM
If you really think you aren't going to want to do something more sophisticated then you can use QPainter as mentioned.
However my experience of this is that it's not fully implemented on the BlackBerry platform yet and causes artifacts when in use so you might run in to problems later.
You say it's just a line but in reality it's a polygon with fill with background grid and labels nothing too complicated but I think looking at the graphing libraries first may give you a better easier ride in the long term.
With a bit of luck (and now name dropped ) Peter will come in and reply when he reads this as his app does graphing.
03-10-2013 04:19 PM - edited 03-10-2013 04:23 PM
BlackBerry have just copied the QT documentation across so proceed with caution.
I haven't used QLine but it's a class to represent a line (vector) and therefore does not draw anything itself just passed to Q classes that do.