From 5e4beec1e5f245d81eda949e53d221858d24f512 Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 16 Sep 2013 10:03:33 +0200 Subject: rounded corners for message boxes --- helpers.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'helpers.c') diff --git a/helpers.c b/helpers.c index a5ca8a0..7304046 100644 --- a/helpers.c +++ b/helpers.c @@ -49,6 +49,23 @@ static void DrawRoundedCorners(cPixmap *p, int radius, int x, int y, int width, } } +static void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int radius, int width, int height) { + if (radius < 3) + return; + p->DrawEllipse(cRect(0,0,radius,radius), borderColor, -2); + p->DrawEllipse(cRect(-1,-1,radius,radius), clrTransparent, -2); + + p->DrawEllipse(cRect(width-radius,0,radius,radius), borderColor, -1); + p->DrawEllipse(cRect(width-radius+1,-1,radius,radius), clrTransparent, -1); + + p->DrawEllipse(cRect(0,height-radius,radius,radius), borderColor, -3); + p->DrawEllipse(cRect(-1,height-radius+1,radius,radius), clrTransparent, -3); + + p->DrawEllipse(cRect(width-radius,height-radius,radius,radius), borderColor, -4); + p->DrawEllipse(cRect(width-radius+1,height-radius+1,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