}
static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
- const ssize_t x,const ssize_t y,const char *expression,
+ const ssize_t x,const ssize_t y,const char *expression,const size_t depth,
ExceptionInfo *exception)
{
char
}
*q='\0';
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,subexpression,
- 0,&beta,exception);
+ depth,&beta,exception);
i=(ssize_t) alpha;
if (*p != '\0')
p++;
}
*q='\0';
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,subexpression,
- 0,&beta,exception);
+ depth,&beta,exception);
point.x=alpha;
point.y=beta;
if (*p != '\0')
}
*q='\0';
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,subexpression,
- 0,&beta,exception);
+ depth,&beta,exception);
point.x+=alpha;
point.y+=beta;
if (*p != '\0')
FxReturn(atan(alpha));
}
if (LocaleCompare(expression,"a") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'B':
case 'b':
{
if (LocaleCompare(expression,"b") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'C':
FxReturn(cos(alpha));
}
if (LocaleCompare(expression,"c") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'D':
FxReturn((double) gcd);
}
if (LocaleCompare(expression,"g") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'H':
case 'h':
{
if (LocaleCompare(expression,"h") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
if (LocaleCompare(expression,"hue") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
if (LocaleNCompare(expression,"hypot",5) == 0)
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+5,
case 'k':
{
if (LocaleCompare(expression,"k") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'I':
case 'i':
{
if (LocaleCompare(expression,"intensity") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
if (LocaleNCompare(expression,"int",3) == 0)
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,
FxReturn((double) !!IsNaN(alpha));
}
if (LocaleCompare(expression,"i") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'J':
case 'j':
{
if (LocaleCompare(expression,"j") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
#if defined(MAGICKCORE_HAVE_J0)
if (LocaleNCompare(expression,"j0",2) == 0)
{
FxReturn(log10(alpha));
}
if (LocaleCompare(expression,"lightness") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'M':
FxReturn(gamma);
}
if (LocaleCompare(expression,"m") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'N':
FxReturn((double) (alpha < MagickEpsilon));
}
if (LocaleCompare(expression,"n") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'O':
if (LocaleCompare(expression,"Opaque") == 0)
FxReturn(1.0);
if (LocaleCompare(expression,"o") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'P':
FxReturn(pow(alpha,*beta));
}
if (LocaleCompare(expression,"p") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'Q':
FxReturn(floor(alpha+0.5));
}
if (LocaleCompare(expression,"r") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'S':
case 's':
{
if (LocaleCompare(expression,"saturation") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
if (LocaleNCompare(expression,"sign",4) == 0)
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+4,
FxReturn((1.0/(1.0+exp(-alpha))));
}
if (LocaleCompare(expression,"s") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'T':
FxReturn(ceil(alpha));
}
if (LocaleCompare(expression,"t") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'U':
case 'u':
{
if (LocaleCompare(expression,"u") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'V':
case 'v':
{
if (LocaleCompare(expression,"v") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'W':
FxReturn(*beta);
}
if (LocaleCompare(expression,"w") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'Y':
case 'y':
{
if (LocaleCompare(expression,"y") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
case 'Z':
case 'z':
{
if (LocaleCompare(expression,"z") == 0)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
break;
}
default:
q=(char *) expression;
alpha=InterpretSiPrefixValue(expression,&q);
if (q == expression)
- FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,exception));
+ FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));
FxReturn(alpha);
}