001    package railo.runtime.functions.image;
002    
003    import railo.runtime.PageContext;
004    import railo.runtime.exp.PageException;
005    import railo.runtime.img.Image;
006    import railo.runtime.op.Caster;
007    import railo.runtime.type.Struct;
008    
009    public class ImageDrawText {
010    
011            public static String call(PageContext pc, Object name, String str,double x, double y) throws PageException {
012                    return call(pc, name, str,x, y, null);
013            }
014            public static String call(PageContext pc, Object name, String str,double x, double y, Struct ac) throws PageException {
015                    if(name instanceof String) name=pc.getVariable(Caster.toString(name));
016                    Image img = Image.toImage(name);
017                    
018                    img.drawString(str, (int)x, (int)y, ac);
019                    return null;
020            }
021            
022    }