On Sat, 12 Feb 2011, John Dovers wrote:
>
> Hello,
>
> I am trying to display an image on a canvas, but for some reason it isn't
> working. Could you help me?
>
> This is how I initialize the canvas (error checking is removed to shorten the
> code):
>
> canvas = evas_new();
>
> evas_output_method_set(canvas, evas_render_method_lookup("buffer"));
> evas_output_size_set(canvas, width, height);
> evas_output_viewport_set(canvas, 0, 0, width, height);
>
> einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(canvas);
>
> einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32;
> einfo->info.dest_buffer = new int[width * height];
> einfo->info.dest_buffer_row_bytes = width * sizeof(int);
> einfo->info.use_color_key = 0;
> einfo->info.alpha_threshold = 0;
> einfo->info.func.new_update_region = NULL;
> einfo->info.func.free_update_region = NULL;
> evas_engine_info_set(canvas, (Evas_Engine_Info *) einfo);
Is there any reason why you do not use ecore_evas instead of setting all
the evas stuff yourself ?
Vincent
>
> This is how I add the image:
>
> r4 = evas_object_image_add(m_canvas);
> evas_object_image_file_set(r4, "background.png", NULL);
> evas_object_move(r4, 0, 0);
> evas_object_resize(r4, 720, 576);
> evas_object_image_fill_set(r4, 0, 0, 720, 576);
> evas_object_show(r4);
>
> The image is not showing.
>
> However, showing a simple rectangle is working so I would assume nothing is
> wrong with my canvas itself.
>
> Thanks a lot.
>
> Best regards,
>
> John D.
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel