From: Gustavo S. B. <bar...@pr...> - 2011-05-11 18:59:49
|
On Wed, May 11, 2011 at 3:53 PM, Mika Laitio <la...@pi...> wrote: >>> http://ists.pl/~alias/enlightenment/docs/cookbook/ch03s03.html >>> >>> was the most uptodate example I found from smart object creation >>> altought it still used "evas_smart_new" which has now been replaced with >>> struct Evas_Smart_Class and evas_smart_class_new method. >> >> what kind of enlightenment widget? elm? e17 itself? or just inside your app? > > I think it would be cool to have generic "xy graph widget" like > filedialogs, clocks, etc. in elementary. I assume that once done in that > way, one could then re-use it on apps by creating edje file for example > with editje and then setup there some default values like: > > - size and position > - title > - x-axis unit > - y-axis unit > - max and min x and y values > - some kind of grid_size_x and grid_size_y and values to indicate grid > size and sub-values shown in axises > - colors used for drawing axises (r,g,b,a) > - colors used for displaying caption texts (r,g,b,a) > - backround image/color > - array of values to show > > Of course it should be possible to override these values set to edje > file later from the code. > > So you still think, I should write the graph drawing code with cairo and > then try to find out example code from Barbieri howto render cairo graph > to image that could be used by this widget. I just ignored that idea since 1) I don't want to be tied to cairo (anti-grain or other techs would work the same way); 2) cairo does not offer a "report what was draw so far". Point #2 there is a real problem as if you update just a part of your cairo surface (say 0,0 to 10,10), then you'll need to manually know it to call evas with updated region. This makes it impossible to merge nicely with evas that automatically renders on main loop, simply because you'd not know what was updated. I've asked cairo guys, nobody had any motivation to create such a thing. :-/ -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: bar...@gm... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 |