parent
81676f217d
commit
244a1da63c
|
@ -33,3 +33,7 @@
|
||||||
2013-01-23 Yakov Goldberg
|
2013-01-23 Yakov Goldberg
|
||||||
|
|
||||||
* Porting to Eo
|
* Porting to Eo
|
||||||
|
|
||||||
|
2013-02-18 Cedric Bail
|
||||||
|
|
||||||
|
* Test and benchmark lines.
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -6,6 +6,7 @@ Changes since Expedite 1.7.0:
|
||||||
Additions:
|
Additions:
|
||||||
|
|
||||||
* Support for Wayland engines
|
* Support for Wayland engines
|
||||||
|
* Test and benchmark lines
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,24 @@ image_blend_occlude3_very_many.c \
|
||||||
poly_blend.c \
|
poly_blend.c \
|
||||||
proxy_image.c \
|
proxy_image.c \
|
||||||
proxy_text_fixed.c \
|
proxy_text_fixed.c \
|
||||||
proxy_text_random.c
|
proxy_text_random.c \
|
||||||
|
line_blend.c
|
||||||
|
# \
|
||||||
|
# image_mask.c \
|
||||||
|
# image_mask_2.c \
|
||||||
|
# image_mask_3.c \
|
||||||
|
# image_mask_4.c \
|
||||||
|
# image_mask_5.c \
|
||||||
|
# image_mask_6.c \
|
||||||
|
# image_mask_7.c \
|
||||||
|
# image_mask_8.c \
|
||||||
|
# image_mask_9.c \
|
||||||
|
# image_mask_10.c \
|
||||||
|
# image_mask_11.c \
|
||||||
|
# image_mask_12.c \
|
||||||
|
# image_mask_13.c \
|
||||||
|
# image_mask_14.c \
|
||||||
|
# image_mask_15.c
|
||||||
|
|
||||||
expedite_CFLAGS = @WIN32_CFLAGS@ @WAYLAND_CLIENT_CFLAGS@ @WAYLAND_EGL_CFLAGS@
|
expedite_CFLAGS = @WIN32_CFLAGS@ @WAYLAND_CLIENT_CFLAGS@ @WAYLAND_EGL_CFLAGS@
|
||||||
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
|
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
#undef FNAME
|
||||||
|
#undef NAME
|
||||||
|
#undef ICON
|
||||||
|
|
||||||
|
/* metadata */
|
||||||
|
#define FNAME line_blend_start
|
||||||
|
#define NAME "Line Blend"
|
||||||
|
#define ICON "rect.png"
|
||||||
|
|
||||||
|
#ifndef PROTO
|
||||||
|
# ifndef UI
|
||||||
|
# include "main.h"
|
||||||
|
|
||||||
|
/* standard var */
|
||||||
|
static int done = 0;
|
||||||
|
/* private data */
|
||||||
|
static Evas_Object *o_images[OBNUM];
|
||||||
|
|
||||||
|
/* setup */
|
||||||
|
static void _setup(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
Evas_Object *o;
|
||||||
|
srnd();
|
||||||
|
for (i = 0; i < OBNUM; i++)
|
||||||
|
{
|
||||||
|
int r, g, b, a;
|
||||||
|
|
||||||
|
o = eo_add(EVAS_OBJ_LINE_CLASS, evas);
|
||||||
|
o_images[i] = o;
|
||||||
|
a = (rnd()&0xff) / 2;
|
||||||
|
r = ((rnd()&0xff) * a) / 255;
|
||||||
|
g = ((rnd()&0xff) * a) / 255;
|
||||||
|
b = ((rnd()&0xff) * a) / 255;
|
||||||
|
eo_do(o,
|
||||||
|
evas_obj_color_set(r, g, b, a),
|
||||||
|
evas_obj_line_xy_set(((win_w / 2) * (rnd()&0xff)) / 255,
|
||||||
|
((win_h / 2) * (rnd()&0xff)) / 255,
|
||||||
|
((win_w / 2) * (rnd()&0xff)) / 255 + (win_w / 2),
|
||||||
|
((win_h / 2) * (rnd()&0xff)) / 255 + (win_h / 2)),
|
||||||
|
evas_obj_visibility_set(EINA_TRUE));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
done = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
static void _cleanup(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PI (double) 3.141592654
|
||||||
|
|
||||||
|
static void
|
||||||
|
_rotate_point(Evas_Coord *ox, Evas_Coord *oy, int r)
|
||||||
|
{
|
||||||
|
double d;
|
||||||
|
double x, y;
|
||||||
|
double angle;
|
||||||
|
|
||||||
|
x = *ox - (win_w / 2);
|
||||||
|
y = *oy - (win_h / 2);
|
||||||
|
|
||||||
|
d = sqrt(x * x + y * y);
|
||||||
|
|
||||||
|
angle = atan((double) y / (double) x);
|
||||||
|
if (x < 0) angle -= PI;
|
||||||
|
|
||||||
|
switch (r & 0x3)
|
||||||
|
{
|
||||||
|
case 0: angle += 1 * PI / 180; break;
|
||||||
|
case 1: angle += -1 * PI / 180; break;
|
||||||
|
case 2: angle += 7 * PI / 180; break;
|
||||||
|
case 3: angle += -1 * PI / 180; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ox = d * cos(angle) + (win_w / 2);
|
||||||
|
*oy = d * sin(angle) + (win_h / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loop - do things */
|
||||||
|
static void _loop(double t, int f)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
Evas_Coord ox1, oy1, ox2, oy2;
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
|
for (i = 0; i < OBNUM; i++)
|
||||||
|
{
|
||||||
|
o = o_images[i];
|
||||||
|
eo_do(o, evas_obj_line_xy_get(&ox1, &oy1, &ox2, &oy2));
|
||||||
|
|
||||||
|
_rotate_point(&ox1, &oy1, i);
|
||||||
|
_rotate_point(&ox2, &oy2, i);
|
||||||
|
eo_do(o, evas_obj_line_xy_set(ox1, oy1, ox2, oy2));
|
||||||
|
}
|
||||||
|
FPS_STD(NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
|
static void _key(char *key)
|
||||||
|
{
|
||||||
|
KEY_STD;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* template stuff - ignore */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef UI
|
||||||
|
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PROTO
|
||||||
|
void FNAME(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PROTO
|
||||||
|
# ifndef UI
|
||||||
|
void FNAME(void)
|
||||||
|
{
|
||||||
|
ui_func_set(_key, _loop);
|
||||||
|
_setup();
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#undef FNAME
|
||||||
|
#undef NAME
|
||||||
|
#undef ICON
|
|
@ -89,6 +89,7 @@
|
||||||
#include "proxy_image.c"
|
#include "proxy_image.c"
|
||||||
#include "proxy_text_fixed.c"
|
#include "proxy_text_fixed.c"
|
||||||
#include "proxy_text_random.c"
|
#include "proxy_text_random.c"
|
||||||
|
#include "line_blend.c"
|
||||||
#if 0 // test disabled - evas having code disabled
|
#if 0 // test disabled - evas having code disabled
|
||||||
#include "image_mask.c"
|
#include "image_mask.c"
|
||||||
#include "image_mask_2.c"
|
#include "image_mask_2.c"
|
||||||
|
|
|
@ -202,6 +202,7 @@ static double weights[] =
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
|
0.0,
|
||||||
0.0
|
0.0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue