diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-04-30 13:04:32 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-04-30 13:04:32 +0100 |
commit | e15f520a9e8a44ce45c5742caadca0698736cf0e (patch) | |
tree | d1a274bd3ab95bedf5fc56850aed69ab336dd2bf /examples | |
parent | 54a2a20e3846704b54d02969facdde268c9024d5 (diff) | |
download | clutter-e15f520a9e8a44ce45c5742caadca0698736cf0e.tar.gz |
examples: Add transparency to the rounded rectangle
Makes it a bit more fancy.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/rounded-rectangle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/rounded-rectangle.c b/examples/rounded-rectangle.c index e9fc2fda9..6ffdb4ce0 100644 --- a/examples/rounded-rectangle.c +++ b/examples/rounded-rectangle.c @@ -38,7 +38,7 @@ draw_content (ClutterCanvas *canvas, cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees); cairo_close_path (cr); - cairo_set_source_rgb (cr, 0.5, 0.5, 1); + cairo_set_source_rgba (cr, 0.5, 0.5, 1, 0.95); cairo_fill (cr); /* we're done drawing */ @@ -59,8 +59,10 @@ main (int argc, char *argv[]) /* create a stage */ stage = clutter_stage_new (); clutter_stage_set_title (CLUTTER_STAGE (stage), "Rectangle with rounded corners"); + clutter_stage_set_use_alpha (CLUTTER_STAGE (stage), TRUE); clutter_actor_set_background_color (stage, CLUTTER_COLOR_Black); clutter_actor_set_size (stage, 500, 500); + clutter_actor_set_opacity (stage, 64); clutter_actor_show (stage); /* our 2D canvas, courtesy of Cairo */ |