now draws rounded rects

This commit is contained in:
Bob Polis 2020-11-16 12:29:13 +01:00
parent 91655454f6
commit 1fb3e1709f

View File

@ -39,7 +39,6 @@ struct Rect {
double line_width {2.0};
};
class FadingRects : public ScreensaverPlugin {
public:
FadingRects() = default;
@ -129,7 +128,12 @@ void FadingRects::render() {
// render rects
for (Rect r : _rects) {
cairo_set_source_rgba(_c, r.red, r.green, r.blue, r.cur_alpha);
cairo_rectangle(_c, r.x, r.y, r.width, r.height);
cairo_rectangle_t rect;
rect.x = r.x;
rect.y = r.y;
rect.width = r.width;
rect.height = r.height;
rounded_rect(rect, 10.0);
cairo_set_line_width(_c, r.line_width);
cairo_stroke(_c);
}