Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE
I can not show a canvas
Hi to all,
I have two questions, first and more basic, I have this code, supose to show some shapes in the screen, but is not showing nothing:
Evas_Object *img;
img = evas_object_image_filled_add(evas_object_evas_get(ad->win));
evas_object_show(img);
cairo_surface_t *surface;
cairo_t *cairo;
evas_object_geometry_get(ad->win, NULL, NULL, &screen_size_w, &screen_size_h);
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, screen_size_w, screen_size_h);
cairo = cairo_create (surface);
cairo_set_source_rgba(cairo, 1, 1, 1, 1);
cairo_paint(cairo);
cairo_translate(cairo,100, 100);
cairo_set_line_width(cairo,2);
cairo_set_source_rgba(cairo, 0.0, 0.0, 1.0, 1.0);
cairo_move_to (cairo, 200 , 200);
cairo_line_to (cairo, 400, 300);
cairo_rel_line_to (cairo, 200 , 100);
cairo_surface_flush(surface);
unsigned char * imageData = cairo_image_surface_get_data(cairo_get_target(cairo));
evas_object_image_data_set(img, imageData);
evas_object_image_data_update_add(img, 0, 0, screen_size_w, screen_size_h);
Second question, Is possible to use the canvas object to draw, not on the window, to draw on a, for example, label object?
Thanks to all!!
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio