mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
drawing ellipses antialiased with Cairo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ private:
|
||||
eViewType viewType;
|
||||
void CachePixmapImages(cTemplatePixmap *pix);
|
||||
void CacheImage(cTemplateFunction *func);
|
||||
void CacheEllipse(cTemplateFunction *func);
|
||||
protected:
|
||||
cGlobals *globals;
|
||||
cTemplateView *rootView;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user