From 25d83725edb5e34c162f40e6d0140a205250079c Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 16 Sep 2013 09:48:12 +0200 Subject: added some rounded corners --- helpers.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'helpers.c') diff --git a/helpers.c b/helpers.c index 54f717f..a5ca8a0 100644 --- a/helpers.c +++ b/helpers.c @@ -40,6 +40,15 @@ static void DrawBlendedBackground(cPixmap *pixmap, tColor color, tColor colorBle } } +static void DrawRoundedCorners(cPixmap *p, int radius, int x, int y, int width, int height) { + if (radius > 2) { + p->DrawEllipse(cRect(x, y, radius, radius), clrTransparent, -2); + p->DrawEllipse(cRect(x + width - radius, y , radius, radius), clrTransparent, -1); + p->DrawEllipse(cRect(x, y + height - radius, radius, radius), clrTransparent, -3); + p->DrawEllipse(cRect(x + width - radius, y + height - radius, radius, radius), clrTransparent, -4); + } +} + static int Minimum(int a, int b, int c, int d, int e, int f) { int min = a; if (b < min) min = b; -- cgit v1.2.3