On Sun, 2005-12-18 at 10:31 -0500, Jason Tackaberry wrote: > The attached simple program which positions an image to negative > coordinates (-80, -60). This crashes Evas cvs, as well as 0.9.9.022:
Hrm, something funky happened with my email client and it didn't attach properly. Here it is again.
#include <stdlib.h>
#include <string.h>
#include <Evas.h>
#include <Evas_Engine_Buffer.h>
int main(int argc, char **argv)
{
unsigned char *buffer = malloc(640*480*4);
Evas_Engine_Info_Buffer *einfo;
Evas *evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("buffer"));
einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(evas);
einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_BGRA32;
einfo->info.dest_buffer_row_bytes = 640*4;
einfo->info.dest_buffer = buffer;
evas_engine_info_set(evas, (Evas_Engine_Info *) einfo);
evas_output_size_set(evas, 640, 480);
Evas_Object *img = evas_object_image_add(evas);
evas_object_image_file_set(img, "background.png", NULL);
evas_object_show(img);
// Comment this out and no more segfault
evas_object_move(img, -80, -60);
int w, h;
evas_object_image_size_get(img, &w, &h);
evas_object_resize(img, w, h);
evas_object_image_fill_set(img, 0, 0, w, h);
evas_render(evas);
}
signature.asc
Description: This is a digitally signed message part
