evas : Documentation added for evas_object_vg 68/43268/1
authorSubhransu Sekhar Mohanty <sub.mohanty@samsung.com>
Wed, 4 Feb 2015 12:56:07 +0000 (21:56 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 8 Jul 2015 02:11:11 +0000 (11:11 +0900)
Change-Id: I60be42a2d1029522a1c6513b1b851976b57d5286

src/lib/evas/Evas_Legacy.h

index c2f0abf..89dd0d1 100644 (file)
@@ -1467,6 +1467,96 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EIN
 
 #include "canvas/evas_rectangle.eo.legacy.h"
 
+/**
+ * @}
+ */
+
+/**
+ * @ingroup Evas_Object_Vg
+ *
+ * @{
+ */
+
+/**
+ * Evas_Object_Vg is the scene graph for managing vector graphics 
+ * objects. User can create shape objects as well as fill objects
+ * and give it to the Evas_Object_Vg for drawing on the screen as well
+ * as managing the lifecycle of the objects. enabling reuse of shape objects.
+ * 
+ * As Evas_Object_Vg is a Evas_Object all the operation that applicable to 
+ * a Evas_Object can be performed on it(clipping , map, etc).
+ *
+ * To create any complex vector graphics you can create a hirarchy of
+ * shape and fill objects and give the hirarchy to Evas_Object which 
+ * will be responsible for drawing and showing on the screen.
+ * 
+ * As the shape object and fill object (linear and radial gradient) have
+ * retain mode API , you only have to create it once and set the properties 
+ * and give it to evas_object_vg.
+ *
+ * Any change in the property of shape/fill object will automaticaly notified
+ * to the evas_object_vg which will trigger a redrawing to reflect the change.
+ *
+ * To create a vector path , you can give list of path commands to the 
+ * shape object using efl_gfx_shape_path_set() api.
+ *
+ * enabling graphical shapes to be constructed and reused.
+ * 
+ */
+
+/**
+ * Creates a new vector object on the given Evas @p e canvas.
+ *
+ * @param e The given canvas.
+ * @return The created vector object handle.
+ *
+ * The shape object hirarchy can be added to the evas_object_vg by
+ * acessing the rootnode of the vg canvas and adding the hirarchy as 
+ * child to the root node.
+ *
+ *     @see evas_obj_vg_root_node_get()    
+ *
+ * Below are the list of feature currently supported by Vector
+ * object.
+ *
+ * @li Drawing SVG Path.
+ *     You can construct a path by using api in efl_gfx_utils.h
+ *
+ * @li Gradient filling and stroking.
+ *     You can fill or stroke the path using linear or radial 
+ *      gradient.
+ *     @see Evas_Vg_Gradient_Linear and Evas_Vg_Gradient_Radial
+ *
+ * @li Transformation support for path and gradient fill.
+ *     You can apply affin transformation on path object.
+ *     @see Eina_Matrix.
+ *
+ * @attention, Below are the list of interface , classes can be
+ *             used to draw vector graphics using vector object.
+ *
+ * @li Efl.Gfx.Shape
+ * @li Evas.VG_Shape
+ * @li Evas.VG_Node
+ * @li Efl.Gfx.Gradient
+ * @li Efl.Gfx.Gradient_Radial
+ * @li Efl.Gfx.Gradient_Linear
+ *
+ * Example:
+ * @code
+ * vector = evas_object_vg_add(canvas);
+ * root = evas_obj_vg_root_node_get(vector);
+ * shape = eo_add(EVAS_VG_SHAPE_CLASS, root);
+ * Efl_Gfx_Path_Command *path_cmd = NULL;
+ * double *points = NULL;
+ * efl_gfx_path_append_circle(&path_cmd, &points);
+ * eo_do(shape,
+ *       evas_vg_node_origin_set(10, 10),
+ *       efl_gfx_shape_stroke_width_set(1.0),
+ *       evas_vg_node_color_set(128, 128, 128, 80),
+ *       efl_gfx_shape_path_set(path_cmd, points)); 
+ * @endcode
+ */
+
 EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 #include "canvas/evas_vg_node.eo.legacy.h"