cairo with gtk problem
- From: "Yogesh Arora" <yogesh ar gmail com>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: cairo with gtk problem
- Date: Thu, 25 May 2006 20:21:13 +0530
---------- Forwarded message ----------
From: Yogesh Arora <yogesh ar gmail com>
Date: May 25, 2006 8:16 PM
Subject: cairo with gtk problem
To: cairo cairographics org
hi
i tried using cairo with gtk using this code
cairo_t* cr = gdk_cairo_create (window->gobj());
cairo_pattern_t *pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, 1.0);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
cairo_rectangle (cr, 0, 0, 1, 1);
cairo_set_source (cr, pat);
cairo_fill (cr);
cairo_pattern_destroy (pat);
pat = cairo_pattern_create_radial (0.45, 0.4, 0.1,
0.4, 0.4, 0.5);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
cairo_set_source (cr, pat);
cairo_arc (cr,(x+width)/2,(y+height)/2, width/2, 0, 2 * M_PI);
cairo_fill (cr);
cairo_pattern_destroy (pat);
i expect some gradients to be drawn(gradient.png) but a plain circle
was drawn on screen(untitled.jpg see the attachments)
can some one point the reason for this
--
Thanks
Yogesh
Dont be intimidated by impossibillity.... be motivated by possibillity!
--
Thanks
Yogesh
Dont be intimidated by impossibillity.... be motivated by possibillity!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]