diff options
author | louis <louis.braun@gmx.de> | 2014-12-03 18:12:37 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-12-03 18:12:37 +0100 |
commit | 7ce445025e10bf4eb0c4066907e588039c09f1ad (patch) | |
tree | 0a554b47d2db26909eb4628b70427cb40b8493b1 /libtemplate | |
parent | def1b3cc301398875b43fc52e50ed936302f56c6 (diff) | |
download | vdr-plugin-skindesigner-7ce445025e10bf4eb0c4066907e588039c09f1ad.tar.gz vdr-plugin-skindesigner-7ce445025e10bf4eb0c4066907e588039c09f1ad.tar.bz2 |
drawing ellipses antialiased with Cairo
Diffstat (limited to 'libtemplate')
-rw-r--r-- | libtemplate/template.c | 11 | ||||
-rw-r--r-- | libtemplate/template.h | 1 | ||||
-rw-r--r-- | libtemplate/templatefunction.c | 5 | ||||
-rw-r--r-- | libtemplate/templatefunction.h | 4 |
4 files changed, 20 insertions, 1 deletions
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); +} diff --git a/libtemplate/template.h b/libtemplate/template.h index 2c1cfb2..e0a8066 100644 --- a/libtemplate/template.h +++ b/libtemplate/template.h @@ -34,6 +34,7 @@ private: eViewType viewType; void CachePixmapImages(cTemplatePixmap *pix); void CacheImage(cTemplateFunction *func); + void CacheEllipse(cTemplateFunction *func); protected: cGlobals *globals; cTemplateView *rootView; diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 8465961..1ddf297 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -6,7 +6,10 @@ using namespace std; // --- cTemplateFunction -------------------------------------------------------------
-cTemplateFunction::cTemplateFunction(eFuncType type) {
+int cTemplateFunction::nextId = 0;
+
+cTemplateFunction::cTemplateFunction(eFuncType type) {
+ id = nextId++;
this->type = type;
debug = false;
containerX = 0;
diff --git a/libtemplate/templatefunction.h b/libtemplate/templatefunction.h index f7af25c..59d6002 100644 --- a/libtemplate/templatefunction.h +++ b/libtemplate/templatefunction.h @@ -102,7 +102,10 @@ enum eOverflowType { }; class cTemplateFunction { +private: + static int nextId; protected: + int id; eFuncType type; bool debug; int containerX; //X of parent container @@ -185,6 +188,7 @@ public: //Parse parameters with dynamically set Tokens bool ParseParameters(void); //Getter Functions + int GetId(void) { return id; }; eFuncType GetType(void) { return type; }; bool DoDebug(void) { return debug; }; string GetParameter(eParamType type); |