From 936fe70f8bd19491e2a76984082b2c79b72dda26 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 1 Dec 2002 23:48:19 +0000 Subject: [PATCH] rico-suave. SVN revision: 6468 --- legacy/evas/evas.c.in | 6 +++--- legacy/evas/src/lib/canvas/evas_callbacks.c | 21 ++++++++++++++++--- legacy/evas/src/lib/canvas/evas_object_main.c | 2 +- .../directfb/evas_engine_dfb_image_objects.c | 3 +++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/legacy/evas/evas.c.in b/legacy/evas/evas.c.in index b50c552567..a3b97af124 100644 --- a/legacy/evas/evas.c.in +++ b/legacy/evas/evas.c.in @@ -30,9 +30,9 @@ These routines are used for Evas Library interaction @section intro What is Evas? -Evas is a clean display canvas API for several display systems that can draw -anti-aliased text, smooth super and sub-sampled scaled images, alpha-blend -objects much and more. +Evas is a clean display canvas API for several target display systems that +can draw anti-aliased text, smooth super and sub-sampled scaled images, +alpha-blend objects much and more. It abstracts any need to know much about what the characteristics of your display system are or what graphics calls are used to draw them and how. It diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c index fdf58d229f..a277eb54c6 100644 --- a/legacy/evas/src/lib/canvas/evas_callbacks.c +++ b/legacy/evas/src/lib/canvas/evas_callbacks.c @@ -41,7 +41,6 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void } } -/* public functions */ /** * Add a callback function to an object * @param obj Object to attach a callback to @@ -50,8 +49,14 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * @param data The data pointer to be passed to @p func * * This function adds a function callback to an object when the event of type - * @p type occurs on object @p obj. The function will be passed the pointer - * @p data when it is called. A callback function must look like this: + * @p type occurs on object @p obj. The fucntion is @p func. + * + * In the event of a memory allocation error during addition of the callback to + * the object, evas_alloc_error() should be used to determine the nature of + * the error, if any, and the program should sensibly try and recover. + * + * The function will be passed the pointer @p data when it is called. A + * callback function must look like this: * * @code * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -154,7 +159,17 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info); * * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_UP, up_callback, my_data); + * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + * { + * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n"); + * exit(-1); + * } * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, down_callback, my_data); + * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + * { + * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n"); + * exit(-1); + * } * @endcode */ void diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c index b61c2466b8..5e9b66a9af 100644 --- a/legacy/evas/src/lib/canvas/evas_object_main.c +++ b/legacy/evas/src/lib/canvas/evas_object_main.c @@ -334,7 +334,7 @@ evas_object_coords_recalc(Evas_Object *obj) obj->cur.geometry.x + obj->cur.geometry.w) - obj->cur.cache.geometry.x; obj->cur.cache.geometry.h = - evas_coord_world_x_to_screen(obj->layer->evas, + evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y + obj->cur.geometry.h) - obj->cur.cache.geometry.y; if (obj->func->coords_recalc) obj->func->coords_recalc(obj); diff --git a/legacy/evas/src/lib/engines/directfb/evas_engine_dfb_image_objects.c b/legacy/evas/src/lib/engines/directfb/evas_engine_dfb_image_objects.c index d0ee0dfa3b..b43b74476a 100644 --- a/legacy/evas/src/lib/engines/directfb/evas_engine_dfb_image_objects.c +++ b/legacy/evas/src/lib/engines/directfb/evas_engine_dfb_image_objects.c @@ -457,6 +457,9 @@ evas_engine_directfb_image_draw(void *data, void *context, void *surface, { re->backbuf->SetColor(re->backbuf, r, g, b, a); } + + re->backbuf->SetSrcBlendFunction(re->backbuf, DSBF_SRCALPHA); + img->SetSrcBlendFunction(img, DSBF_INVSRCALPHA); re->backbuf->SetBlittingFlags(re->backbuf, flags); re->backbuf->StretchBlit(re->backbuf, img, &inrect, &outrect);