[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Evas Gradients



Having a few troubles with evas gradients. The window that gets set up
doesn't seem to repair a gradient properly when another window is passed
over the gradient.  Ive got a quick example adapted from the efl cookbook
below. Have I missed something or is it a problem in evas?

Cheers,
Daniel.

********************************************************************

#include <stdio.h>
#include <Ecore_Evas.h>
#include <Ecore.h>

#define WIDTH 400
#define HEIGHT 400

        Ecore_Evas  *   ee;
        Evas        *   evas;
        Evas_Object *   base_rect, *o;

int main(){

   ecore_init();
   ecore_evas_init();

   ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, WIDTH, HEIGHT);
        ecore_evas_title_set(ee, "Ecore_Evas Template");
        ecore_evas_borderless_set(ee, 0);
        ecore_evas_show(ee);


   evas = ecore_evas_get(ee);

   base_rect = evas_object_rectangle_add(evas);
   evas_object_resize(base_rect, (double)WIDTH, (double)HEIGHT);
   evas_object_color_set(base_rect, 244, 243, 242, 255);
   evas_object_show(base_rect);

   o = evas_object_gradient_add(evas);
   evas_object_gradient_color_add(o, 100, 100, 100, 100, 1 );
   evas_object_gradient_color_add(o, 255, 255, 255,   0, 1 );
   evas_object_gradient_color_add(o, 100, 100, 100, 100, 1 );
   evas_object_gradient_angle_set(o, 0 );
   evas_object_gradient_fill_set(o,0,0,WIDTH,HEIGHT);
   evas_object_resize(o, WIDTH, HEIGHT);
   evas_object_layer_set(o, 91);
   evas_object_show(o);

        /* Insert Object Here */

        ecore_main_loop_begin();

        return 0;
}