drawing ellipses antialiased with Cairo

This commit is contained in:
louis
2014-12-03 18:12:37 +01:00
parent def1b3cc30
commit 7ce445025e
12 changed files with 304 additions and 15 deletions

View File

@@ -636,14 +636,17 @@ void cView::DoDrawEllipse(int num, cTemplateFunction *func, int x0, int y0) {
y += y0;
int w = func->GetNumericParameter(ptWidth);
int h = func->GetNumericParameter(ptHeight);
cRect size(x, y, w, h);
tColor clr = func->GetColorParameter(ptColor);
int quadrant = func->GetNumericParameter(ptQuadrant);
if (quadrant < -4 || quadrant > 8) {
esyslog("skindesigner: wrong quadrant %d for drawellipse, allowed values are from -4 to 8", quadrant);
quadrant = 0;
}
DrawEllipse(num, size, clr, quadrant);
cImage *ellipse = imgCache->GetEllipse(func->GetId(), w, h, clr, quadrant);
if (ellipse) {
const cPoint point(x, y);
DrawImage(num, point, *ellipse);
}
}
void cView::DoDrawSlope(int num, cTemplateFunction *func, int x0, int y0) {