mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
flower: Clear surface
This commit is contained in:
parent
c7c60646ad
commit
8ca1cc20a1
1 changed files with 5 additions and 0 deletions
|
|
@ -62,6 +62,11 @@ draw_stuff(cairo_surface_t *surface, int width, int height)
|
|||
double x1, y1, x2, y2, x3, y3;
|
||||
|
||||
cr = cairo_create(surface);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_set_source_rgba(cr, 0, 0, 0, 0);
|
||||
cairo_paint(cr);
|
||||
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
|
||||
cairo_translate(cr, width / 2, height / 2);
|
||||
cairo_move_to(cr, cos(0) * r1, sin(0) * r1);
|
||||
for (t = 0, i = 0; i < petal_count; i++, t += dt * 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue