On Thu, 17 Jul 2008 05:58:24 -0400 Jose Gonzalez <[EMAIL PROTECTED]> babbled:
> Ok, now for a proposed api for evas "vgfx objects" -- a very simple > one, but general enough to allow for the overwhelming majority of vgfx uses > (and certainly ones for most 'real-time' use in evas). > > Again, by evas "vgfx objects" we mean evas objects that can be "filled > and/or stroked" (eg. lines, rects, polys, paths, ... maybe text) with a color > or a "texture" (aka: a paint or pattern). or maybe even more simply: "any primitive uses for svg rendering" might be an apt goal... :) the important bit is the actual rendering code... and back-end. once done it can be exported to objects no problem. :) > (1) For "filling" of supported objs: > ******************************* > > void evas_object_fill_color_set(obj, r,g,b,a); > void evas_object_fill_texture_set(obj, Evas_Object *texture_obj); > > Where 'texture_obj' is restricted to be an image or a gradient obj (no > others for now). Also, no fill-texturing of an image or grad obj. I think I > briefly explained the interpretation of this before - ie. image or grad objs > are really equivalent to a simple rectangle being flled with image or grad > texture, where the 'texture' part is given by fill geometries and such.. So, > when these objects are set as texture_objs of vector objs, all general object > properties are ignored and only the 'fill' properties are used - except that > the fill geometries' coord system is now taken rel to the textured obj's > origin. > > > > (2) For "stroking" of supported objs: > ******************************** > > void evas_object_stroke_color_set(obj, r,g,b,a); > void evas_object_stroke_texture_set(obj, Evas_Object *texture_obj); > > These are similar to above for the fill. > > void evas_object_stroke_weight_set(obj, Evas_Coord weight); > > > > (3) For determining whether to fill and/or stroke supported objects: > *************************************************************** > > void evas_object_draw_mode_set(obj, int draw_mode); > > Where 'draw_mode' is one of: EVAS_DRAW_STROKE, EVAS_DRAW_FILL, or > EVAS_DRAW_STROKE_FILL. > > > More api funcs can be added to obtain fuller vgfx support, but this is > actually a good chunk of it (just need a bit on cap styles, join styles, and > dashed-stroking, but not much else really that would be reasonable here). > > It doesn't cover the other proposed desire to change the polygon object > 'points' api, nor does it cover a possible "path" object api (which I would > suggest be given in the same manner as that proposed for polys, ie. *set* a > "path description" which consists of some means of defining the path). > Nor does it cover possibly setting (affine) transforms on the vertex- > geometries that might define such vgfx objects.. leave that for later. > > > > (4) Extensions to the current rectangle obj api: > ******************************************* > > void evas_object_rectangle_corner_radius_set(obj, float r); > void evas_object_rectangle_corner_style_set(obj, int corner_style); > > Where 'corner_style' can be one of EVAS_CORNER_ROUND or > EVAS_CORNER_BEVEL. > > > void evas_object_rectangle_corners_set(obj, Evas_Bool tl, Evas_Bool tr, > Evas_Bool bl, Evas_Bool br); > > The corners to apply the style to, or leave squared off (default). > > Rectangles can be filled and/or stroked, but the stroking will be > defined to increase inward - though one could also add an api for deciding > whether to have it centered on the rect, or increase inward or outward. hmm. ok - you havent covered all the vector gfx primitves (polygon, polyline, line, bezier curve/path, ellipse etc.). maybe.. just an idea we have a new vgfx object. leave existing objects alone. Evas_Object *evas_object_vgfx_add(Evas *evas); and like image objects.. you can set a .svg to be the content... OR you can add the content yourself? ie add polygons, curves, lines, set what paths clip what... etc. ? Evas_Object *evas_objec_vgfx_polygon_add(Evas_Object *vgfx_obj); ... hmm. but then why should they have to live within a vgfx obj? -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [EMAIL PROTECTED] ------------------------------------------------------------------------- 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 enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel