use of lucee.runtime.img.Image in project Lucee by lucee.
the class ImageRotateDrawingAxis method call.
public static String call(PageContext pc, Object name, double angle, double x, double y) throws PageException {
// if(name instanceof String) name=pc.getVariable(Caster.toString(name));
Image img = Image.toImage(pc, name);
img.rotateAxis(angle, x, y);
return null;
}
use of lucee.runtime.img.Image in project Lucee by lucee.
the class ImageSetAntialiasing method call.
public static String call(PageContext pc, Object name, String strAntialias) throws PageException {
// if(name instanceof String) name=pc.getVariable(Caster.toString(name));
Image img = Image.toImage(pc, name);
strAntialias = strAntialias.trim().toLowerCase();
boolean antialias;
if ("on".equals(strAntialias))
antialias = true;
else if ("off".equals(strAntialias))
antialias = false;
else
antialias = Caster.toBooleanValue(strAntialias);
img.setAntiAliasing(antialias);
return null;
}
use of lucee.runtime.img.Image in project Lucee by lucee.
the class ImageSetBackgroundColor method call.
public static String call(PageContext pc, Object name, String strColor) throws PageException {
// if(name instanceof String) name=pc.getVariable(Caster.toString(name));
Image img = Image.toImage(pc, name);
Color color = ColorCaster.toColor(strColor);
img.setBackground(color);
return null;
}
use of lucee.runtime.img.Image in project Lucee by lucee.
the class ImageSetDrawingAlpha method call.
public static String call(PageContext pc, Object name, double alpha) throws PageException {
// if(name instanceof String) name=pc.getVariable(Caster.toString(name));
Image img = Image.toImage(pc, name);
if (alpha < 0 || alpha > 1)
throw new FunctionException(pc, "ImageSetDrawingAlpha", 2, "alpha", "alpha must be a value between 0 and 1");
img.setAlpha((float) alpha);
return null;
}
use of lucee.runtime.img.Image in project Lucee by lucee.
the class ImageSetDrawingTransparency method call.
public static String call(PageContext pc, Object name, double percent) throws PageException {
// if(name instanceof String) name=pc.getVariable(Caster.toString(name));
Image img = Image.toImage(pc, name);
if (percent < 0.0 || percent > 100.0)
throw new FunctionException(pc, "ImageSetDrawingTransparency", 2, "percent", "value must be between 0 and 100");
img.setTranparency((float) percent);
return null;
}
Aggregations