}
else if (getFileVersion().equalTo(FXGVersion.v1_0))
{
// Rest of the blend modes are unknown for FXG 1.0
//Exception:Unknown blend mode: {0}.
throw new FXGException(getStartLine(), getStartColumn(), "UnknownBlendMode", value);
}
else if (isForMobile() && getCompilerVersion().equalTo(FXGVersion.v2_0)
&& (FXG_BLENDMODE_COLORDOGE_VALUE.equals(value) ||
FXG_BLENDMODE_COLORBURN_VALUE.equals(value) ||
FXG_BLENDMODE_EXCLUSION_VALUE.equals(value) ||
FXG_BLENDMODE_SOFTLIGHT_VALUE.equals(value) ||
FXG_BLENDMODE_HUE_VALUE.equals(value) ||
FXG_BLENDMODE_SATURATION_VALUE.equals(value) ||
FXG_BLENDMODE_COLOR_VALUE.equals(value) ||
FXG_BLENDMODE_LUMINOSITY_VALUE.equals(value)))
{
// The following pixel-bender based blend modes are not supported by FXG 2.0 on Mobile.
// Log a warning and ignore the blend modes.
FXGLog.getLogger().log(FXGLogger.WARN, "MobileUnsupportedPBBlendMode", null,
((AbstractFXGNode)node).getDocumentName(), node.getStartLine(), node.getStartColumn(), value);
return BlendMode.NORMAL;
}
else if (FXG_BLENDMODE_COLORDOGE_VALUE.equals(value))
{
return BlendMode.COLORDODGE;
}
else if (FXG_BLENDMODE_COLORBURN_VALUE.equals(value))
{
return BlendMode.COLORBURN;
}
else if (FXG_BLENDMODE_EXCLUSION_VALUE.equals(value))
{
return BlendMode.EXCLUSION;
}
else if (FXG_BLENDMODE_SOFTLIGHT_VALUE.equals(value))
{
return BlendMode.SOFTLIGHT;
}
else if (FXG_BLENDMODE_HUE_VALUE.equals(value))
{
return BlendMode.HUE;
}
else if (FXG_BLENDMODE_SATURATION_VALUE.equals(value))
{
return BlendMode.SATURATION;
}
else if (FXG_BLENDMODE_COLOR_VALUE.equals(value))
{
return BlendMode.COLOR;
}
else if (FXG_BLENDMODE_LUMINOSITY_VALUE.equals(value))
{
return BlendMode.LUMINOSITY;
}
else if (FXG_BLENDMODE_AUTO_VALUE.equals(value))
{
return BlendMode.AUTO;
}
else
{
if (isVersionGreaterThanCompiler())
{
// Warning: Minor version of this FXG file is greater than minor
// version supported by this compiler. Log a warning for an unknown
// blend mode.
FXGLog.getLogger().log(FXGLogger.WARN, "UnknownBlendMode", null, getDocumentName(), startLine, startColumn, value);
}
else
{
//Exception:Unknown blend mode: {0} for FXGVersion 2.0.
throw new FXGException(getStartLine(), getStartColumn(), "UnknownBlendMode", value);
}
}
return defMode;