summaryrefslogtreecommitdiff
path: root/examples/cairoview.c
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2005-04-18 22:50:12 +0000
committerManish Singh <yosh@src.gnome.org>2005-04-18 22:50:12 +0000
commitf0b89739f8161df2c19afd061f7eb8f9a522c92c (patch)
tree590f3b892be08ec676ec8f46d24c0dc47db621c8 /examples/cairoview.c
parenta5a4cb9d89f4040a8679765861e3207ed633e9c0 (diff)
downloadpango-f0b89739f8161df2c19afd061f7eb8f9a522c92c.tar.gz
Update to new Cairo API for setting color and opacity.
Mon Apr 18 15:49:36 2005 Manish Singh <yosh@gimp.org> * examples/cairoview.c: Update to new Cairo API for setting color and opacity.
Diffstat (limited to 'examples/cairoview.c')
-rw-r--r--examples/cairoview.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/cairoview.c b/examples/cairoview.c
index ec99d7ac..a805595b 100644
--- a/examples/cairoview.c
+++ b/examples/cairoview.c
@@ -66,8 +66,7 @@ do_cairo_render (PangoLayout *layout,
pango_layout_get_extents (layout, &ink, &logical);
cairo_save (cr);
- cairo_set_rgb_color (cr, 1.0, 0.0, 0.0);
- cairo_set_alpha (cr, 0.75);
+ cairo_set_source_rgba (cr, 1.0, 0.0, 0.0, 0.75);
cairo_rectangle (cr,
(double)logical.x / PANGO_SCALE - lw / 2,
@@ -76,7 +75,7 @@ do_cairo_render (PangoLayout *layout,
(double)logical.height / PANGO_SCALE + lw);
cairo_stroke (cr);
- cairo_set_rgb_color (cr, 0.0, 1.0, 0.0);
+ cairo_set_source_rgba (cr, 0.0, 1.0, 0.0, 0.75);
cairo_rectangle (cr,
(double)ink.x / PANGO_SCALE - lw / 2,