now draws rounded rects
This commit is contained in:
parent
91655454f6
commit
1fb3e1709f
@ -39,7 +39,6 @@ struct Rect {
|
|||||||
double line_width {2.0};
|
double line_width {2.0};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class FadingRects : public ScreensaverPlugin {
|
class FadingRects : public ScreensaverPlugin {
|
||||||
public:
|
public:
|
||||||
FadingRects() = default;
|
FadingRects() = default;
|
||||||
@ -129,7 +128,12 @@ void FadingRects::render() {
|
|||||||
// render rects
|
// render rects
|
||||||
for (Rect r : _rects) {
|
for (Rect r : _rects) {
|
||||||
cairo_set_source_rgba(_c, r.red, r.green, r.blue, r.cur_alpha);
|
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_set_line_width(_c, r.line_width);
|
||||||
cairo_stroke(_c);
|
cairo_stroke(_c);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user