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    
008    public class ImagePaste {
009    
010            public static String call(PageContext pc, Object src1, Object src2) throws PageException {
011                    return call(pc, src1, src2, 0,0);
012            }
013            
014            public static String call(PageContext pc, Object src1, Object src2, double x) throws PageException {
015                    return call(pc, src1, src2, x,0);
016            }
017            
018            public static String call(PageContext pc, Object src1, Object src2, double x, double y) throws PageException {
019                    if(src1 instanceof String) src1=pc.getVariable(Caster.toString(src1));
020                    //if(src2 instanceof String) src2=pc.getVariable(Caster.toString(src2));
021                    
022                    Image.toImage(src1).paste(Image.createImage(pc, src2,true,false,true,null),(int)x,(int)y);
023                    return null;
024            }
025    }