Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_common.h evas_gl_common.h evas_private.h 


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/include/evas_common.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- evas_common.h       29 Nov 2005 09:02:51 -0000      1.45
+++ evas_common.h       3 Dec 2005 09:27:53 -0000       1.46
@@ -80,6 +80,7 @@
 typedef struct _RGBA_Draw_Context     RGBA_Draw_Context;
 typedef struct _RGBA_Gradient         RGBA_Gradient;
 typedef struct _RGBA_Gradient_Color   RGBA_Gradient_Color;
+typedef struct _RGBA_Gradient_Type    RGBA_Gradient_Type;
 typedef struct _RGBA_Polygon_Point    RGBA_Polygon_Point;
 typedef struct _RGBA_Font             RGBA_Font;
 typedef struct _RGBA_Font_Int         RGBA_Font_Int;
@@ -105,6 +106,10 @@
 
 typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int 
dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
 
+typedef void (*Gfx_Func_Gradient_Span)(DATA32 *map, int map_len, DATA32 *dst, 
int dst_len,
+                                       int x, int y, int axx, int axy, int 
ayx, int ayy,
+                                       void *geom_data);
+
 /*****************************************************************************/
 
 typedef enum _RGBA_Image_Flags
@@ -195,6 +200,10 @@
       } func;
       void *data;
    } font_ext;
+   struct {
+      int color_space;
+   } interpolation;
+   unsigned char  anti_alias : 1;
 };
 
 struct _RGBA_Surface
@@ -233,6 +242,36 @@
 struct _RGBA_Gradient
 {
    Evas_Object_List *colors;
+   int               ncolors;
+   int               len;
+
+   unsigned char     has_alpha : 1;
+   struct
+     {
+       int            x, y, w, h;
+     } fill;
+   struct
+     {
+       char          *name;
+       char          *params;
+       RGBA_Gradient_Type *geometer;
+     } type;
+   struct
+     {
+       DATA32        *data;
+       int            len;
+       unsigned char  has_alpha : 1;
+     } map;
+};
+
+struct _RGBA_Gradient_Type
+{
+   char                   *name;
+   void                   *geom_data;
+   void                    (*setup_geom)(RGBA_Gradient *gr, int spread);
+   int                     (*has_alpha)(RGBA_Gradient *gr, int spread);
+   int                     (*get_map_len)(RGBA_Gradient *gr, int spread);
+   Gfx_Func_Gradient_Span  (*get_span_func)(RGBA_Gradient *gr, int spread, 
unsigned char aa);
 };
 
 struct _RGBA_Polygon_Point
@@ -362,6 +401,7 @@
 };
 
 /*****************************************************************************/
+#include "evas_macros.h"
 
 #define CONVERT_LOOP_START_ROT_0() \
    src_ptr = src; \
@@ -474,6 +514,12 @@
 #define GB_VAL(p) ((DATA16 *)(p)[1])
 #endif
 
+#define RGB_JOIN(r,g,b) \
+        (((r) << 16) + ((g) << 8) + (b))
+
+#define ARGB_JOIN(a,r,g,b) \
+        (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
+
 /* thanks to some chats with Mirek Fidler... the new blender code for C
  * blender fallbacks is faster. benchmarks (for the blending code only):
  *
@@ -541,6 +587,12 @@
      } \
 }
 
+#define _EVAS_TEXTURE_REFLECT     0
+#define _EVAS_TEXTURE_REPEAT      1
+#define _EVAS_TEXTURE_RESTRICT    2
+
+#define _EVAS_COLOR_SPACE_ARGB    0
+#define _EVAS_COLOR_SPACE_AHSV    1
 
 /*****************************************************************************/
 
@@ -586,6 +638,9 @@
 void *evas_object_list_find             (void *in_list, void *in_item);
 
 /****/
+void evas_common_init                                   (void);
+void evas_common_shutdown                               (void);
+
 void evas_common_cpu_init                               (void);
 
 int  evas_common_cpu_have_cpuid                         (void);
@@ -596,6 +651,7 @@
 /****/
 void evas_common_blend_init                             (void);
 void evas_common_blend_init_evas_pow_lut                (void);
+void evas_common_blend_free_evas_pow_lut                (void);
 
 void evas_common_blend_pixels_rgba_to_rgb_c             (DATA32 *src, DATA32 
*dst, int len);
 void evas_common_blend_pixels_rgba_to_rgb_mmx           (DATA32 *src, DATA32 
*dst, int len);
@@ -627,10 +683,6 @@
 void evas_common_copy_pixels_cmod_rgba_to_rgba_c        (DATA32 *src, DATA32 
*dst, int len, DATA8 *rmod, DATA8 *gmod, DATA8 *bmod, DATA8 *amod);
 void evas_common_copy_pixels_cmod_rgb_to_rgba_c         (DATA32 *src, DATA32 
*dst, int len, DATA8 *rmod, DATA8 *gmod, DATA8 *bmod, DATA8 *amod);
 
-void evas_common_blend_pixels_mul_color_rgba_to_rgb_c   (DATA32 *src, DATA32 
*dst, int len, DATA32 mul_color);
-void evas_common_blend_pixels_mul_color_rgba_to_rgb_mmx (DATA32 *src, DATA32 
*dst, int len, DATA32 mul_color);
-void evas_common_blend_pixels_mul_color_rgba_to_rgba_c  (DATA32 *src, DATA32 
*dst, int len, DATA32 mul_color);
-
 void evas_common_blend_alpha_color_rgba_to_rgb_c        (DATA8 *src, DATA32 
*dst, int len, DATA32 col);
 void evas_common_blend_alpha_color_rgba_to_rgb_mmx      (DATA8 *src, DATA32 
*dst, int len, DATA32 col);
 void evas_common_blend_alpha_color_rgba_to_rgba_c       (DATA8 *src, DATA32 
*dst, int len, DATA32 col);
@@ -702,6 +754,11 @@
 
 void evas_common_convert_yuv_420p_601_rgba                     (DATA8 **src, 
DATA8 *dst, int w, int h);
 
+void evas_common_convert_hsv_to_rgb                     (float h, float s, 
float v, int *r, int *g, int *b);
+void evas_common_convert_rgb_to_hsv                     (int r, int g, int b, 
float *h, float *s, float *v);
+void evas_common_convert_hsv_to_rgb_int                 (int h, int s, int v, 
int *r, int *g, int *b);
+void evas_common_convert_rgb_to_hsv_int                 (int r, int g, int b, 
int *h, int *s, int *v);
+
 /****/
 void evas_common_scale_init                            (void);
 
@@ -746,11 +803,16 @@
 RGBA_Image   *evas_common_image_find              (const char *filename, const 
char *key, DATA64 timestamp);
 int           evas_common_image_ram_usage         (RGBA_Image *im);
 void          evas_common_image_dirty             (RGBA_Image *im);
+void          evas_common_image_cache_free        (void);
 
 RGBA_Image         *evas_common_load_image_from_file     (const char *file, 
const char *key);
 void                evas_common_load_image_data_from_file(RGBA_Image *im);
 int                 evas_common_save_image_to_file       (RGBA_Image *im, 
const char *file, const char *key, int quality, int compress);
 
+RGBA_Image   *evas_common_image_line_buffer_obtain       (int len);
+void          evas_common_image_line_buffer_release      (void);
+void          evas_common_image_line_buffer_free         (void);
+
 /****/
 void           evas_common_rectangle_init          (void);
 
@@ -763,8 +825,21 @@
 void           evas_common_gradient_free           (RGBA_Gradient *gr);
 void           evas_common_gradient_colors_clear   (RGBA_Gradient *gr);
 void           evas_common_gradient_color_add      (RGBA_Gradient *gr, int r, 
int g, int b, int a, int dist);
-void           evas_common_gradient_draw           (RGBA_Image *dst, 
RGBA_Draw_Context *dc, int x, int y, int w, int h, RGBA_Gradient *gr, double 
angle);
-DATA32        *evas_common_gradient_map            (RGBA_Gradient *gr, 
RGBA_Draw_Context *dc, int len);
+void           evas_common_gradient_type_set        (RGBA_Gradient *gr, char 
*name);
+void           evas_common_gradient_type_params_set (RGBA_Gradient *gr, char 
*params);
+void           evas_common_gradient_fill_set        (RGBA_Gradient *gr, int x, 
int y, int w, int h);
+RGBA_Gradient *evas_common_gradient_geometry_init   (RGBA_Gradient *gr, int 
spread);
+int            evas_common_gradient_has_alpha       (RGBA_Gradient *gr, int 
spread);
+void           evas_common_gradient_map             (RGBA_Draw_Context *dc, 
RGBA_Gradient *gr, int spread);
+void           evas_common_gradient_draw            (RGBA_Image *dst, 
RGBA_Draw_Context *dc, int x, int y, int w, int h, RGBA_Gradient *gr, double 
angle, int spread);
+
+RGBA_Gradient_Type  *evas_common_gradient_geometer_get     (char *name);
+RGBA_Gradient_Type  *evas_common_gradient_linear_get       (void);
+RGBA_Gradient_Type  *evas_common_gradient_radial_get       (void);
+RGBA_Gradient_Type  *evas_common_gradient_angular_get      (void);
+RGBA_Gradient_Type  *evas_common_gradient_rectangular_get  (void);
+RGBA_Gradient_Type  *evas_common_gradient_sinusoidal_get   (void);
+char                *evas_common_gradient_get_key_fval     (char *in, char 
*key, float *val);
 
 /****/
 void          evas_common_line_init               (void);
@@ -870,11 +945,14 @@
 Cutout_Rect       *evas_common_draw_context_cutouts_split     (Cutout_Rect 
*in, Cutout_Rect *split);
 Cutout_Rect       *evas_common_draw_context_cutout_split      (Cutout_Rect 
*in, Cutout_Rect *split);
 Cutout_Rect       *evas_common_draw_context_cutout_merge      (Cutout_Rect 
*in, Cutout_Rect *merge);
+void               evas_common_draw_context_set_anti_alias    
(RGBA_Draw_Context *dc, unsigned char aa);
+void               evas_common_draw_context_set_color_interpolation    
(RGBA_Draw_Context *dc, int color_space);
+
 Gfx_Func_Blend_Src_Dst           evas_common_draw_func_blend_get       
(RGBA_Image *src, RGBA_Image *dst, int pixels);
 Gfx_Func_Blend_Color_Dst         evas_common_draw_func_blend_color_get (DATA32 
src, RGBA_Image *dst, int pixels);
 Gfx_Func_Blend_Src_Cmod_Dst      evas_common_draw_func_blend_cmod_get  
(RGBA_Image *src, RGBA_Image *dst, int pixels);
 Gfx_Func_Blend_Src_Mul_Dst       evas_common_draw_func_blend_mul_get   
(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
-Gfx_Func_Blend_Src_Alpha_Mul_Dst evas_common_draw_func_blend_alpha_get 
(RGBA_Image *dst);
+Gfx_Func_Blend_Src_Alpha_Mul_Dst evas_common_draw_func_blend_alpha_get (DATA32 
src, RGBA_Image *dst);
 Gfx_Func_Blend_Src_Dst           evas_common_draw_func_copy_get        (int 
pixels, int reverse);
 
 void              evas_font_dir_cache_free(void);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_gl_common.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_gl_common.h    8 Oct 2005 06:22:43 -0000       1.9
+++ evas_gl_common.h    3 Dec 2005 09:27:53 -0000       1.10
@@ -187,6 +187,14 @@
 
 Evas_GL_Gradient *evas_gl_common_gradient_color_add(Evas_GL_Gradient *gr, int 
r, int g, int b, int a, int distance);
 Evas_GL_Gradient *evas_gl_common_gradient_colors_clear(Evas_GL_Gradient *gr);
+void              evas_gl_common_gradient_free(Evas_GL_Gradient *gr);
+void              evas_gl_common_gradient_fill_set(Evas_GL_Gradient *gr, int 
x, int y, int w, int h);
+void              evas_gl_common_gradient_type_set(Evas_GL_Gradient *gr, char 
*name);
+void              evas_gl_common_gradient_type_params_set(Evas_GL_Gradient 
*gr, char *params);
+void             *evas_gl_common_gradient_geometry_init(Evas_GL_Gradient *gr, 
int spread);
+int               evas_gl_common_gradient_alpha_get(Evas_GL_Gradient *gr, int 
spread);
+
+void              evas_gl_common_gradient_map(RGBA_Draw_Context *dc, 
Evas_GL_Gradient *gr, int spread);
 
 void              evas_gl_common_swap_rect(Evas_GL_Context *gc, int x, int y, 
int w, int h);
 
@@ -194,7 +202,7 @@
 void              evas_gl_common_image_draw(Evas_GL_Context *gc, 
RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int 
dx, int dy, int dw, int dh, int smooth);
 void              evas_gl_common_line_draw(Evas_GL_Context *gc, 
RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
 void              evas_gl_common_poly_draw(Evas_GL_Context *gc, 
RGBA_Draw_Context *dc, Evas_GL_Polygon *poly);
-void              evas_gl_common_gradient_draw(Evas_GL_Context *gc, 
RGBA_Draw_Context *dc, Evas_GL_Gradient *gr, int x, int y, int w, int h, double 
angle);
+void              evas_gl_common_gradient_draw(Evas_GL_Context *gc, 
RGBA_Draw_Context *dc, Evas_GL_Gradient *gr, int x, int y, int w, int h, double 
angle, int spread);
 
 Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_GL_Context *gc, 
RGBA_Font_Glyph *fg);
 void                  evas_gl_font_texture_free(Evas_GL_Font_Texture *ft);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- evas_private.h      26 Nov 2005 08:04:19 -0000      1.56
+++ evas_private.h      3 Dec 2005 09:27:53 -0000       1.57
@@ -322,6 +322,10 @@
       unsigned char     have_clipees : 1;
       int               layer;
       Evas_Object      *clipper;
+      unsigned char     anti_alias;
+      struct {
+         int color_space;
+      } interpolation;
    } cur, prev;
 
    char                       *name;
@@ -467,6 +471,10 @@
    int  (*context_multiplier_get)          (void *data, void *context, int *r, 
int *g, int *b, int *a);
    void (*context_cutout_add)              (void *data, void *context, int x, 
int y, int w, int h);
    void (*context_cutout_clear)            (void *data, void *context);
+   void (*context_anti_alias_set)          (void *data, void *context, 
unsigned char aa);
+   unsigned char (*context_anti_alias_get) (void *data, void *context);
+   void (*context_color_interpolation_set) (void *data, void *context, int 
color_space);
+   int  (*context_color_interpolation_get) (void *data, void *context);
 
    void (*rectangle_draw)                  (void *data, void *context, void 
*surface, int x, int y, int w, int h);
 
@@ -478,8 +486,14 @@
 
    void *(*gradient_color_add)             (void *data, void *context, void 
*gradient, int r, int g, int b, int a, int distance);
    void *(*gradient_colors_clear)          (void *data, void *context, void 
*gradient);
-
-   void (*gradient_draw)                   (void *data, void *context, void 
*surface, void *gradient, int x, int y, int w, int h, double angle);
+   void (*gradient_free)                   (void *data, void *gradient);
+   void (*gradient_fill_set)               (void *data, void *gradient, int x, 
int y, int w, int h);
+   void (*gradient_type_set)               (void *data, void *gradient, char 
*name);
+   void (*gradient_type_params_set)        (void *data, void *gradient, char 
*params);
+   void *(*gradient_geometry_init)         (void *data, void *gradient, int 
spread);
+   int  (*gradient_alpha_get)              (void *data, void *gradient, int 
spread);
+   void (*gradient_map)                    (void *data, void *context, void 
*gradient, int spread);
+   void (*gradient_draw)                   (void *data, void *context, void 
*surface, void *gradient, int x, int y, int w, int h, double angle, int spread);
 
    void *(*image_load)                     (void *data, char *file, char *key, 
int *error);
    void *(*image_new_from_data)            (void *data, int w, int h, DATA32 
*image_data);




-------------------------------------------------------
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