summaryrefslogtreecommitdiff
path: root/helpers.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-09-17 13:25:12 +0200
committerlouis <louis.braun@gmx.de>2013-09-17 13:25:12 +0200
commit8cac48f1606c6a48226141dd94a59101dd10b1e0 (patch)
tree1270186804f1b0394ef5e0e324aa59ab2b7800e6 /helpers.c
parent82aa79801b08be8e1f22ba1c4a6778867322e246 (diff)
downloadskin-nopacity-8cac48f1606c6a48226141dd94a59101dd10b1e0.tar.gz
skin-nopacity-8cac48f1606c6a48226141dd94a59101dd10b1e0.tar.bz2
fixed a bug with rounded corners in message display
Diffstat (limited to 'helpers.c')
-rw-r--r--helpers.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/helpers.c b/helpers.c
index 7304046..0f8d42d 100644
--- a/helpers.c
+++ b/helpers.c
@@ -49,20 +49,28 @@ 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) {
+static void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int radius, int width, int height, cPixmap *pBack = NULL) {
if (radius < 3)
return;
p->DrawEllipse(cRect(0,0,radius,radius), borderColor, -2);
p->DrawEllipse(cRect(-1,-1,radius,radius), clrTransparent, -2);
+ if (pBack)
+ pBack->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);
+ if (pBack)
+ pBack->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);
+ if (pBack)
+ pBack->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);
+ if (pBack)
+ pBack->DrawEllipse(cRect(width-radius+1,height-radius+1,radius,radius), clrTransparent, -4);
}