On Wed, Sep 17, 2008 at 11:59 PM, Chia-I Wu <[EMAIL PROTECTED]> wrote:
> Sorry, I just realized that I mailed to the wrong list.
>
> On Wed, Sep 17, 2008 at 09:44:15AM -0300, Gustavo Sverzut Barbieri wrote:
>> > I am working on a map application and I would like to draw the GPS track
>> > on the map.  The track is basically lots (thousands) of line segments,
>> > with each segment begins at where the previous one ends.  Is it a good
>> > idea to represent each line segment by a line object?
>> No, since most algorithms we use are linear or exponential on the
>> number of objects, so more objects, more slowdown.
>> Also, Evas has no line width property, so you'll not be able to make
>> it with lines. Use Polygons instead. Polygons are not the most
>> optimized bit of Evas, however it is counted as just one object and
>> it's processed using the scanline polygon fill mode.
> I have made a simple patch to give polygon the option not to fill its
> enclosed region.  It adds the following functions:
>
>        void evas_object_polygon_fill_set  (Evas_Object *obj, int fill);
>        int  evas_object_polygon_fill_get  (const Evas_Object *obj);
>        void evas_object_polygon_close_set (Evas_Object *obj, int close);
>        int  evas_object_polygon_close_get (const Evas_Object *obj);
>
> By default, polygon has "fill" and "close" set to TRUE.  When "fill" is
> FALSE, line_draw is called instead polygon_draw.  "close" makes sense
> only when "fill" is FALSE.  It decides whether the polygon should close
> the path, that is, draw a line from the last point to the first point.

Ok, that could do. But I doubt you'll be able to use 1px lines on a
map application. When we did it, we had to draw thick lines and use
filled polygons for that :-)

I don't have time to review this patch atm, but I guess it's simple.
Let's see if someone do it before me, otherwise wait until weekend.


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to