Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/canvas


Modified Files:
        evas_main.c evas_object_gradient.c evas_object_main.c 
        evas_render.c 


Log Message:


joses's gradient work - gradient look nice. one problem jose.. USE BRACKETS!

do NOT depend on order operation precedence. it broke scaling. laos other
completely bizarre mmx things were going wrong with mm7 ending up not 0 so
i've had to force it to be 0.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_main.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- evas_main.c 29 Nov 2005 11:46:19 -0000      1.24
+++ evas_main.c 3 Dec 2005 09:27:51 -0000       1.25
@@ -43,11 +43,10 @@
 evas_shutdown(void)
 {
    if (--initcount == 0)
-   {
-      evas_font_dir_cache_free();
-         evas_common_image_free_cache();
-   }
-
+     {
+       evas_font_dir_cache_free();
+       evas_common_shutdown();
+     }
    return initcount;
 }
 
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_gradient.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_object_gradient.c      18 Jun 2005 01:00:29 -0000      1.9
+++ evas_object_gradient.c      3 Dec 2005 09:27:51 -0000       1.10
@@ -13,10 +13,19 @@
 
    struct {
       Evas_Angle     angle;
+      int            spread;
+      struct {
+         Evas_Coord  x, y, w, h;
+      } fill;
+      struct {
+         char       *name;
+         char       *params;
+      } type;
+   unsigned char     gradient_opaque : 1;
    } cur, prev;
-   char              changed : 1;
-   char              gradient_changed : 1;
-   char              gradient_opaque : 1;
+   
+   unsigned char     changed : 1;
+   unsigned char     gradient_changed : 1;
 
    void             *engine_data;
 };
@@ -118,8 +127,9 @@
                                                                      
o->engine_data,
                                                                      r, g, b, 
a,
                                                                      distance);
+   if (a != 255) o->cur.gradient_opaque = 0;
    o->gradient_changed = 1;
-   if (a != 255) o->gradient_opaque = 0;
+   o->changed = 1;
    evas_object_change(obj);
 }
 
@@ -144,7 +154,8 @@
                                                                         
obj->layer->evas->engine.data.context,
                                                                         
o->engine_data);
    o->gradient_changed = 1;
-   o->gradient_opaque = 1;
+   o->changed = 1;
+   o->cur.gradient_opaque = 1;
    evas_object_change(obj);
 }
 
@@ -196,7 +207,280 @@
    evas_object_change(obj);
 }
 
+/**
+ * @defgroup Evas_Object_Gradient_Fill_Group Gradient Object Fill Rectangle 
Functions
+ *
+ * Functions that deal with what areas of the gradient object are to be
+ * tiled with the gradient.
+ */
+
+/**
+ * Sets the rectangle on the gradient object that the gradient will be
+ * drawn to.
+ *
+ * Note that the gradient may be tiled around this one rectangle,
+ * according to its spread value - restrict, repeat, or reflect.  To have
+ * only one 'cycle' of the gradient drawn, the spread value must be set
+ * to restrict, or @p x and @p y must be 0 and @p w and @p h need to be
+ * the width and height of the gradient object respectively.
+ *
+ * The default values for the fill parameters is @p x = 0, @p y = 0,
+ * @p w = 32 and @p h = 32.
+ *
+ * @param   obj The given evas gradient object.
+ * @param   x   The X coordinate for the top left corner of the rect.
+ * @param   y   The Y coordinate for the top left corner of the rect.
+ * @param   w   The width of the rect.
+ * @param   h   The height of the rect.
+ * @ingroup Evas_Object_Gradient_Fill_Group
+ */
+void
+evas_object_gradient_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, 
Evas_Coord w, Evas_Coord h)
+{
+   Evas_Object_Gradient *o;
+
+   if (w < 0) w = -w;
+   if (h < 0) h = -h;
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   return;
+   MAGIC_CHECK_END();
+   if ((o->cur.fill.x == x) &&
+       (o->cur.fill.y == y) &&
+       (o->cur.fill.w == w) &&
+       (o->cur.fill.h == h)) return;
+   o->cur.fill.x = x;
+   o->cur.fill.y = y;
+   o->cur.fill.w = w;
+   o->cur.fill.h = h;
+   o->changed = 1;
+   o->gradient_changed = 1;
+   evas_object_change(obj);
+}
+
+/**
+ * Retrieves the dimensions of the rectangle on the gradient object that
+ * the gradient will use as its fill rect.
+ *
+ * See @ref evas_object_gradient_fill_set for more details.
+ *
+ * @param   obj The given evas gradient object.
+ * @param   x   Pointer to an Evas_Coord to store the X coordinate in.
+ * @param   y   Pointer to an Evas_Coord to store the Y coordinate in.
+ * @param   w   Pointer to an Evas_Coord to store the width in.
+ * @param   h   Pointer to an Evas_Coord to store the height in.
+ * @ingroup Evas_Object_Gradient_Fill_Group
+ */
+void
+evas_object_gradient_fill_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, 
Evas_Coord *w, Evas_Coord *h)
+{
+   Evas_Object_Gradient *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   if (x) *x = 0;
+   if (y) *y = 0;
+   if (w) *w = 0;
+   if (h) *h = 0;
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   if (x) *x = 0;
+   if (y) *y = 0;
+   if (w) *w = 0;
+   if (h) *h = 0;
+   return;
+   MAGIC_CHECK_END();
+   if (x) *x = o->cur.fill.x;
+   if (y) *y = o->cur.fill.y;
+   if (w) *w = o->cur.fill.w;
+   if (h) *h = o->cur.fill.h;
+}
+
+/**
+ * Sets the tiling mode for the given evas gradient object.
+ * @param   obj   The given evas gradient object.
+ * @param   spread One of EVAS_TEXTURE_RESTRICT, EVAS_TEXTURE_REPEAT,
+ * or EVAS_TEXTURE_REFLECT.
+ * @ingroup Evas_Object_Gradient_Group
+ */
+void
+evas_object_gradient_spread_set(Evas_Object *obj, int spread)
+{
+   Evas_Object_Gradient *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   return;
+   MAGIC_CHECK_END();
+   if (spread == o->cur.spread) return;
+   o->cur.spread = spread;
+   o->changed = 1;
+   o->gradient_changed = 1;
+   if (spread == EVAS_TEXTURE_RESTRICT)
+      o->cur.gradient_opaque = 0;
+   evas_object_change(obj);
+}
+
+/**
+ * Retrieves the spread (tiling mode) for the given gradient object.
+ * @param   obj The given evas gradient object.
+ * @return  The current spread mode of the gradient object.
+ * @ingroup Evas_Object_Gradient_Group
+ */
+int
+evas_object_gradient_spread_get(Evas_Object *obj)
+{
+   Evas_Object_Gradient *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return EVAS_TEXTURE_REFLECT;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   return EVAS_TEXTURE_REFLECT;
+   MAGIC_CHECK_END();
+   return o->cur.spread;
+}
+
+/**
+ * @defgroup Evas_Object_Gradient_Type_Group Gradient Object Type Functions
+ *
+ * Functions that set or get a gradient's geometric type. Examples are 
"linear",
+ * "radial", "rectangular", "sinusoidal", ... Some types may accept added 
parameters
+ * to further specify the look.
+ */
+
+/**
+ * Sets the geometric type displayed by the given gradient object.
+ * @param   obj  The given gradient object.
+ * @param   name Name of the geometric type that the gradient is to be drawn 
as.
+ * @param   params List of allowable param_name, param_value pairs. Must be in 
the
+ * format "param_name=param_value; param_name2=param_value2;", eg. 
"amplitude=0.8;".
+ * Can be NULL.
+ * @ingroup Evas_Object_Gradient_Type_Group
+ */
+void
+evas_object_gradient_type_set(Evas_Object *obj, const char *name, const char 
*params)
+{
+   Evas_Object_Gradient *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   return;
+   MAGIC_CHECK_END();
+   if (!name || !*name)
+     {
+       name = "linear";
+       params = NULL;
+     }
+   if (params && !*params)
+       params = NULL;
+   if ((o->cur.type.name) && (!strcmp(o->cur.type.name, name)))
+     {
+       if ((!o->cur.type.params) && (!params))
+         return;
+       if ((o->cur.type.params) && (params) && (!strcmp(o->cur.type.params, 
params)))
+         return;
+       if (o->cur.type.params)
+         {
+           if (o->prev.type.params == o->cur.type.params)
+               o->prev.type.params = strdup(o->cur.type.params);
+           free(o->cur.type.params);
+           o->cur.type.params = NULL;
+         }
+       if (params)
+         o->cur.type.params = strdup(params);
+       o->changed = 1;
+       o->gradient_changed = 1;
+       evas_object_change(obj);
+       return;
+     }
+
+   if (o->cur.type.name)
+     {
+       if (o->prev.type.name == o->cur.type.name)
+         o->prev.type.name = strdup(o->cur.type.name);
+       free(o->cur.type.name);
+       o->cur.type.name = NULL;
+     }
+   o->cur.type.name = strdup(name);
+
+   if (o->cur.type.params)
+     {
+       if (o->prev.type.params == o->cur.type.params)
+         o->prev.type.params = strdup(o->cur.type.params);
+       free(o->cur.type.params);
+       o->cur.type.params = NULL;
+     }
+   if (params)
+       o->cur.type.params = strdup(params);
+   o->changed = 1;
+   o->gradient_changed = 1;
+   evas_object_change(obj);
+}
+
+/**
+ * Retrieves the type name and params of the given gradient object.
+ * @param   obj  The given gradient object.
+ * @param   name Pointer to a character pointer to store the pointer to the 
type
+ *               name in.
+ * @param   params  Pointer to a character pointer to store the pointer to the 
type
+ *               params string in.
+ * @ingroup Evas_Object_Gradient_Type_Group
+ */
+void
+evas_object_gradient_type_get(Evas_Object *obj, char **name, char **params)
+{
+   Evas_Object_Gradient *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   if (name) *name = NULL;
+   if (params) *params = NULL;
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Gradient *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
+   if (name) *name = NULL;
+   if (params) *params = NULL;
+   return;
+   MAGIC_CHECK_END();
+   if (name) *name = o->cur.type.name;
+   if (params) *params = o->cur.type.params;
+}
+
+
+/*
+  these two functions don't really belong here as they can apply to other
+  objs as well, but for now..
+*/
+
+/**
+   FIXME: ...
+**/
+void
+evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
+{
+   evas_common_convert_hsv_to_rgb(h, s, v, r, g, b);
+}
 
+/**
+   FIXME: ...
+**/
+void
+evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
+{
+   evas_common_convert_rgb_to_hsv(r, g, b, h, s, v);
+}
 
 
 
@@ -216,11 +500,14 @@
    obj->cur.geometry.w = 32.0;
    obj->cur.geometry.h = 32.0;
    obj->cur.layer = 0;
+   obj->cur.anti_alias = 1;
+   obj->cur.interpolation.color_space = EVAS_COLOR_SPACE_ARGB;
    /* set up object-specific settings */
    obj->prev = obj->cur;
    /* set up methods (compulsory) */
    obj->func = &object_func;
    obj->type = o_type;
+   obj->changed = 1;
 }
 
 static void *
@@ -232,8 +519,17 @@
    o = calloc(1, sizeof(Evas_Object_Gradient));
    o->magic = MAGIC_OBJ_GRADIENT;
    o->cur.angle = 0.0;
+   o->cur.spread = EVAS_TEXTURE_REFLECT;
+   o->cur.fill.x = 0;
+   o->cur.fill.y = 0;
+   o->cur.fill.w = 32;
+   o->cur.fill.h = 32;
+   o->cur.type.name = strdup("linear");
+   o->cur.type.params = NULL;
+   o->cur.gradient_opaque = 1;
    o->prev = o->cur;
-   o->gradient_opaque = 1;
+   o->gradient_changed = 1;
+   o->changed = 1;
    return o;
 }
 
@@ -248,13 +544,44 @@
    return;
    MAGIC_CHECK_END();
    /* free obj */
-   o->engine_data = 
obj->layer->evas->engine.func->gradient_colors_clear(obj->layer->evas->engine.data.output,
-                                                                        
obj->layer->evas->engine.data.context,
-                                                                        
o->engine_data);
+   if (o->prev.type.name && (o->prev.type.name != o->cur.type.name))
+       free(o->prev.type.name);
+   if (o->prev.type.params && (o->prev.type.params != o->cur.type.params))
+       free(o->prev.type.params);
+   if (o->cur.type.name)
+       free(o->cur.type.name);
+   if (o->cur.type.params)
+       free(o->cur.type.params);
+   
obj->layer->evas->engine.func->gradient_free(obj->layer->evas->engine.data.output,
+                                               o->engine_data);
    o->magic = 0;
    free(o);
 }
 
+
+static void
+evas_object_grad_get_fill_coords(Evas_Object *obj, Evas_Coord fx, Evas_Coord 
fy, Evas_Coord fw, Evas_Coord fh, Evas_Coord *fx_ret, Evas_Coord *fy_ret, 
Evas_Coord *fw_ret,
+Evas_Coord *fh_ret)
+{
+   Evas_Coord  x, y, w, h;
+
+   x = ((fx * obj->layer->evas->output.w) /
+           (Evas_Coord)obj->layer->evas->viewport.w);
+   w = ((fw * obj->layer->evas->output.w) /
+       (Evas_Coord)obj->layer->evas->viewport.w);
+   if (fw <= 0) fw = 1;
+   y = ((fy * obj->layer->evas->output.h) /
+           (Evas_Coord)obj->layer->evas->viewport.h);
+   h = ((fh * obj->layer->evas->output.h) /
+       (Evas_Coord)obj->layer->evas->viewport.h);
+   if (fh <= 0) fh = 1;
+   
+   *fx_ret = x;  *fw_ret = w;
+   *fy_ret = y;  *fh_ret = h;
+}
+
+
+
 static void
 evas_object_gradient_render(Evas_Object *obj, void *output, void *context, 
void *surface, int x, int y)
 {
@@ -269,25 +596,30 @@
        (obj->cur.cache.clip.g == 255) &&
        (obj->cur.cache.clip.b == 255) &&
        (obj->cur.cache.clip.a == 255))
-     obj->layer->evas->engine.func->context_multiplier_unset(output,
-                                                            context);
+     obj->layer->evas->engine.func->context_multiplier_unset(output, context);
    else
-     obj->layer->evas->engine.func->context_multiplier_set(output,
-                                                          context,
+     obj->layer->evas->engine.func->context_multiplier_set(output, context,
                                                           
obj->cur.cache.clip.r,
                                                           
obj->cur.cache.clip.g,
                                                           
obj->cur.cache.clip.b,
                                                           
obj->cur.cache.clip.a);
+   obj->layer->evas->engine.func->context_anti_alias_set(output, context,
+                                                        obj->cur.anti_alias);
+   obj->layer->evas->engine.func->context_color_interpolation_set(output, 
context,
+                                                  
obj->cur.interpolation.color_space);
    if (o->engine_data)
-     obj->layer->evas->engine.func->gradient_draw(output,
-                                                 context,
-                                                 surface,
-                                                 o->engine_data,
-                                                 obj->cur.cache.geometry.x + x,
-                                                 obj->cur.cache.geometry.y + y,
-                                                 obj->cur.cache.geometry.w,
-                                                 obj->cur.cache.geometry.h,
-                                                 o->cur.angle);
+     {
+       if (o->gradient_changed)
+           obj->layer->evas->engine.func->gradient_map(output, context, 
o->engine_data,
+                                                       o->cur.spread);   
+       obj->layer->evas->engine.func->gradient_draw(output, context, surface,
+                                                    o->engine_data,
+                                                    obj->cur.cache.geometry.x 
+ x,
+                                                    obj->cur.cache.geometry.y 
+ y,
+                                                    obj->cur.cache.geometry.w,
+                                                    obj->cur.cache.geometry.h,
+                                                    o->cur.angle, 
o->cur.spread);
+     }
 }
 
 static void
@@ -313,6 +645,43 @@
          evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
+   /* if it changed color */
+   if ((obj->cur.color.r != obj->prev.color.r) ||
+       (obj->cur.color.g != obj->prev.color.g) ||
+       (obj->cur.color.b != obj->prev.color.b) ||
+       (obj->cur.color.a != obj->prev.color.a))
+       o->gradient_changed = 1;
+   if ((obj->cur.cache.clip.r != obj->prev.cache.clip.r) ||
+       (obj->cur.cache.clip.g != obj->prev.cache.clip.g) ||
+       (obj->cur.cache.clip.b != obj->prev.cache.clip.b) ||   
+       (obj->cur.cache.clip.a != obj->prev.cache.clip.a))  
+       o->gradient_changed = 1;
+   if (obj->cur.anti_alias != obj->prev.anti_alias)
+       o->gradient_changed = 1;
+   if (obj->cur.interpolation.color_space != 
obj->prev.interpolation.color_space)
+       o->gradient_changed = 1;
+   if (obj->cur.cache.clip.a != 255)
+       o->cur.gradient_opaque = 0;
+   if (o->gradient_changed && o->engine_data)
+     {
+       Evas_Coord  fx, fy, fw, fh;
+
+       evas_object_grad_get_fill_coords(obj, o->cur.fill.x, o->cur.fill.y,
+                                        o->cur.fill.w, o->cur.fill.h,
+                                        &fx, &fy, &fw, &fh);
+       
obj->layer->evas->engine.func->gradient_fill_set(obj->layer->evas->engine.data.output,
 o->engine_data,
+                                                        fx, fy, fw, fh);
+       
obj->layer->evas->engine.func->gradient_type_set(obj->layer->evas->engine.data.output,
 o->engine_data,
+                                                        o->cur.type.name);
+       
obj->layer->evas->engine.func->gradient_type_params_set(obj->layer->evas->engine.data.output,
 o->engine_data,
+                                                               
o->cur.type.params);
+
+       o->engine_data = 
obj->layer->evas->engine.func->gradient_geometry_init(obj->layer->evas->engine.data.output,
 o->engine_data, o->cur.spread);
+       if (o->engine_data)
+         {
+           o->cur.gradient_opaque &= 
!(obj->layer->evas->engine.func->gradient_alpha_get(obj->layer->evas->engine.data.output,
 o->engine_data, o->cur.spread));
+         }
+    }
    /* now figure what changed and add draw rects */
    /* if it just became visible or invisible */
    is_v = evas_object_is_visible(obj);
@@ -326,24 +695,19 @@
    if (!is_v) goto done;
    /* clipper changed this is in addition to anything else for obj */
    updates = evas_object_render_pre_clipper_change(updates, obj);
-   /* if we restacked (layer or just within a layer) and dont clip anyone */
-   if (obj->restack)
+   /* gradient changed */
+   if (o->gradient_changed)
      {
        updates = evas_object_render_pre_prev_cur_add(updates, obj);
        goto done;
      }
-   /* if it changed color */
-   if ((obj->cur.color.r != obj->prev.color.r) ||
-       (obj->cur.color.g != obj->prev.color.g) ||
-       (obj->cur.color.b != obj->prev.color.b) ||
-       (obj->cur.color.a != obj->prev.color.a))
+   /* if we restacked (layer or just within a layer) and dont clip anyone */
+   if (obj->restack)
      {
        updates = evas_object_render_pre_prev_cur_add(updates, obj);
        goto done;
      }
-   /* if it changed geometry - and obviously not visibility or color */
-   /* caluclate differences since we have a constant color fill */
-   /* we really only need to update the differences */
+   /* if it changed geometry */
    if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
        (obj->cur.geometry.y != obj->prev.geometry.y) ||
        (obj->cur.geometry.w != obj->prev.geometry.w) ||
@@ -358,15 +722,10 @@
        updates = evas_object_render_pre_prev_cur_add(updates, obj);
        goto done;
      }
-   /* angle changed */
-   if (o->gradient_changed)
-     {
-       updates = evas_object_render_pre_prev_cur_add(updates, obj);
-       goto done;
-     }
    /* it obviously didn't change - add a NO obscure - this "unupdates"  this */
    /* area so if there were updates for it they get wiped. don't do it if we */
    /* arent fully opaque and we are visible */
+   
    if (evas_object_is_visible(obj) &&
        evas_object_is_opaque(obj))
      
obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
@@ -374,6 +733,7 @@
                                                            
obj->cur.cache.clip.y,
                                                            
obj->cur.cache.clip.w,
                                                            
obj->cur.cache.clip.h);
+   
    done:
    evas_object_render_pre_effect_updates(updates, obj, is_v, was_v);
 }
@@ -398,6 +758,11 @@
      }
    /* move cur to prev safely for object data */
    obj->prev = obj->cur;
+   obj->changed = 0;
+   if (o->prev.type.name && (o->prev.type.name != o->cur.type.name))
+       free(o->prev.type.name);
+   if (o->prev.type.params && (o->prev.type.params != o->cur.type.params))
+       free(o->prev.type.params);
    o->prev = o->cur;
    o->changed = 0;
    o->gradient_changed = 0;
@@ -411,8 +776,12 @@
    /* this returns 1 if the internal object data implies that the object is */
    /* currently fulyl opque over the entire gradient it occupies */
    o = (Evas_Object_Gradient *)(obj->object_data);
-   return o->gradient_opaque;
-}
+   if (!o->engine_data) return 1;
+   o->cur.gradient_opaque &=
+   
!(obj->layer->evas->engine.func->gradient_alpha_get(obj->layer->evas->engine.data.output,
+   o->engine_data, o->cur.spread));   
+   return o->cur.gradient_opaque;
+ }
 
 static int
 evas_object_gradient_was_opaque(Evas_Object *obj)
@@ -422,5 +791,6 @@
    /* this returns 1 if the internal object data implies that the object was */
    /* currently fulyl opque over the entire gradient it occupies */
    o = (Evas_Object_Gradient *)(obj->object_data);
-   return o->gradient_opaque;
+   if (!o->engine_data) return 1;
+   return o->prev.gradient_opaque;
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- evas_object_main.c  28 Nov 2005 15:18:00 -0000      1.41
+++ evas_object_main.c  3 Dec 2005 09:27:51 -0000       1.42
@@ -822,6 +822,78 @@
 }
 
 /**
+ * Sets whether or not the given evas object is to be drawn anti_aliased.
+ * @param   obj The given evas object.
+ * @param   anti_alias. 1 if the object is to be anti_aliased, 0 otherwise.
+ * @ingroup Evas_Object_Group
+ */
+void
+evas_object_anti_alias_set(Evas_Object *obj, Evas_Bool anti_alias)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me) return;
+   if (obj->cur.anti_alias == !!anti_alias)
+       return;
+   obj->cur.anti_alias = !!anti_alias;
+   evas_object_change(obj);  
+}
+
+
+/**
+ * Retrieves whether or not the given evas object is to be drawn anti_aliased.
+ * @param   obj The given evas object.
+ * @return  @c 1 if the object is to be anti_aliased.  @c 0 otherwise.
+ * @ingroup Evas_Object_Group
+ */
+Evas_Bool
+evas_object_anti_alias_get(Evas_Object *obj)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return 0;
+   MAGIC_CHECK_END();
+   if (obj->delete_me) return 0;
+   return obj->cur.anti_alias;
+}
+
+/**
+ * Sets the color_space to be used for linear interpolation of colors.
+ * @param   obj The given evas object.
+ * @param   color_space, one of EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV.
+ * @ingroup Evas_Object_Group
+ */
+void
+evas_object_color_interpolation_set(Evas_Object *obj, int color_space)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me) return;
+   if (obj->cur.interpolation.color_space == color_space)
+       return;
+   obj->cur.interpolation.color_space = color_space;
+   evas_object_change(obj);  
+}
+
+
+/**
+ * Retrieves the current value of the color space used for linear 
interpolation.
+ * @param   obj The given evas object.
+ * @return  @c EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV.
+ * @ingroup Evas_Object_Group
+ */
+int
+evas_object_color_interpolation_get(Evas_Object *obj)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return 0;
+   MAGIC_CHECK_END();
+   if (obj->delete_me) return 0;
+   return obj->cur.interpolation.color_space;
+}
+
+/**
  * Retrieves the evas that the given evas object is on.
  * @param   obj The given evas object.
  * @return  The evas that the object is on.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_render.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_render.c       2 Nov 2005 07:13:49 -0000       1.16
+++ evas_render.c       3 Dec 2005 09:27:51 -0000       1.17
@@ -1,6 +1,9 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
+static Evas_List *
+evas_render_updates_internal(Evas *e, unsigned char make_updates);
+
 /**
  * To be documented.
  *
@@ -169,14 +172,8 @@
      }
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
-Evas_List *
-evas_render_updates(Evas *e)
+static Evas_List *
+evas_render_updates_internal(Evas *e, unsigned char make_updates)
 {
    Evas_List *updates = NULL;
    Evas_List *obscuring_objects = NULL;
@@ -275,14 +272,18 @@
                                                         &ux, &uy, &uw, &uh,
                                                         &cx, &cy, &cw, &ch)))
      {
-       Evas_Rectangle *rect;
        int off_x, off_y;
 
-       rect = malloc(sizeof(Evas_Rectangle));
-       if (rect)
+       if (make_updates)
          {
-            rect->x = ux; rect->y = uy; rect->w = uw; rect->h = uh;
-            updates = evas_list_append(updates, rect);
+           Evas_Rectangle *rect;
+
+           rect = malloc(sizeof(Evas_Rectangle));
+           if (rect)
+             {
+               rect->x = ux; rect->y = uy; rect->w = uw; rect->h = uh;
+               updates = evas_list_append(updates, rect);
+             }
          }
        off_x = cx - ux;
        off_y = cy - uy;
@@ -421,15 +422,32 @@
  * FIXME: To be fixed.
  *
  */
+Evas_List *
+evas_render_updates(Evas *e)
+{
+   MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+   return NULL;
+   MAGIC_CHECK_END();
+   
+   if (!e->changed)
+       return NULL;
+   return evas_render_updates_internal(e, 1);
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ *
+ */
 void
 evas_render(Evas *e)
 {
-   Evas_List *updates;
-
    MAGIC_CHECK(e, Evas, MAGIC_EVAS);
    return;
    MAGIC_CHECK_END();
 
-   updates = evas_render_updates(e);
-   if (updates) evas_render_updates_free(updates);
+   if (!e->changed)
+       return;
+  (void)evas_render_updates_internal(e, 0);
 }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to