mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
implemented function drawslope
This commit is contained in:
@@ -83,6 +83,8 @@ void cTemplateFunction::SetParameters(vector<pair<string, string> > params) {
|
||||
p.first = ptTransparency;
|
||||
} else if (!name.compare("quadrant")) {
|
||||
p.first = ptQuadrant;
|
||||
} else if (!name.compare("type")) {
|
||||
p.first = ptType;
|
||||
} else if (!name.compare("align")) {
|
||||
p.first = ptAlign;
|
||||
} else if (!name.compare("valign")) {
|
||||
@@ -215,6 +217,7 @@ bool cTemplateFunction::CalculateParameters(void) {
|
||||
case ptLayer:
|
||||
case ptTransparency:
|
||||
case ptQuadrant:
|
||||
case ptType:
|
||||
case ptNumElements:
|
||||
case ptFloatWidth:
|
||||
case ptFloatHeight:
|
||||
@@ -301,6 +304,9 @@ void cTemplateFunction::CompleteParameters(void) {
|
||||
case ftDrawEllipse:
|
||||
CalculateAlign(GetNumericParameter(ptWidth), GetNumericParameter(ptHeight));
|
||||
break;
|
||||
case ftDrawSlope:
|
||||
CalculateAlign(GetNumericParameter(ptWidth), GetNumericParameter(ptHeight));
|
||||
break;
|
||||
case ftDrawText:
|
||||
CalculateAlign(GetWidth(), GetHeight());
|
||||
break;
|
||||
@@ -439,6 +445,7 @@ int cTemplateFunction::GetWidth(bool cutted) {
|
||||
case ftDrawImage:
|
||||
case ftDrawRectangle:
|
||||
case ftDrawEllipse:
|
||||
case ftDrawSlope:
|
||||
case ftDrawTextBox:
|
||||
funcWidth = GetNumericParameter(ptWidth);
|
||||
break;
|
||||
@@ -459,6 +466,7 @@ int cTemplateFunction::GetHeight(void) {
|
||||
case ftDrawImage:
|
||||
case ftDrawRectangle:
|
||||
case ftDrawEllipse:
|
||||
case ftDrawSlope:
|
||||
funcHeight = GetNumericParameter(ptHeight);
|
||||
break;
|
||||
case ftDrawTextBox: {
|
||||
@@ -1265,6 +1273,9 @@ string cTemplateFunction::GetFuncName(void) {
|
||||
case ftDrawEllipse:
|
||||
name = "Function DrawEllipse";
|
||||
break;
|
||||
case ftDrawSlope:
|
||||
name = "Function DrawSlope";
|
||||
break;
|
||||
case ftNone:
|
||||
name = "Undefined";
|
||||
break;
|
||||
@@ -1332,6 +1343,9 @@ string cTemplateFunction::GetParamName(eParamType pt) {
|
||||
case ptQuadrant:
|
||||
name = "Quadrant";
|
||||
break;
|
||||
case ptType:
|
||||
name = "Type";
|
||||
break;
|
||||
case ptAlign:
|
||||
name = "Align";
|
||||
break;
|
||||
|
@@ -32,6 +32,7 @@ enum eFuncType {
|
||||
ftDrawImage,
|
||||
ftDrawRectangle,
|
||||
ftDrawEllipse,
|
||||
ftDrawSlope,
|
||||
ftNone
|
||||
};
|
||||
|
||||
@@ -54,6 +55,7 @@ enum eParamType {
|
||||
ptLayer,
|
||||
ptTransparency,
|
||||
ptQuadrant,
|
||||
ptType,
|
||||
ptAlign,
|
||||
ptValign,
|
||||
ptScrollMode,
|
||||
|
@@ -107,6 +107,8 @@ void cTemplatePixmap::AddFunction(string name, vector<pair<string, string> > &pa
|
||||
type = ftDrawRectangle;
|
||||
} else if (!name.compare("drawellipse")) {
|
||||
type = ftDrawEllipse;
|
||||
} else if (!name.compare("drawslope")) {
|
||||
type = ftDrawSlope;
|
||||
}
|
||||
|
||||
if (type == ftNone) {
|
||||
|
@@ -558,6 +558,20 @@ void cTemplateView::SetFunctionDefinitions(void) {
|
||||
attributes.insert("quadrant");
|
||||
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
|
||||
|
||||
name = "drawslope";
|
||||
attributes.clear();
|
||||
attributes.insert("debug");
|
||||
attributes.insert("condition");
|
||||
attributes.insert("name");
|
||||
attributes.insert("x");
|
||||
attributes.insert("y");
|
||||
attributes.insert("align");
|
||||
attributes.insert("valign");
|
||||
attributes.insert("width");
|
||||
attributes.insert("height");
|
||||
attributes.insert("color");
|
||||
attributes.insert("type");
|
||||
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
Reference in New Issue
Block a user