From 7ce445025e10bf4eb0c4066907e588039c09f1ad Mon Sep 17 00:00:00 2001 From: louis Date: Wed, 3 Dec 2014 18:12:37 +0100 Subject: drawing ellipses antialiased with Cairo --- libtemplate/template.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libtemplate/template.c') diff --git a/libtemplate/template.c b/libtemplate/template.c index ef7d677..e6141f2 100644 --- a/libtemplate/template.c +++ b/libtemplate/template.c @@ -250,6 +250,8 @@ void cTemplate::CachePixmapImages(cTemplatePixmap *pix) { while(func = pix->GetNextFunction()) { if (func->GetType() == ftDrawImage) { CacheImage(func); + } else if (func->GetType() == ftDrawEllipse) { + CacheEllipse(func); } } } @@ -279,3 +281,12 @@ void cTemplate::CacheImage(cTemplateFunction *func) { break; } } + +void cTemplate::CacheEllipse(cTemplateFunction *func) { + int id = func->GetId(); + int w = func->GetNumericParameter(ptWidth); + int h = func->GetNumericParameter(ptHeight); + tColor clr = func->GetColorParameter(ptColor); + int quadrant = func->GetNumericParameter(ptQuadrant); + imgCache->CacheEllipse(id, w, h, clr, quadrant); +} -- cgit v1.2.3