I have the functions in place that will render the drawing according to the listed function, my question is how can I send that drawing to the function? (My input tag attempt is listed below the function js.)
Here is the function that will handle the final image-->
function recurseImage() {
img = new Image();
img.src = myCanvas.toDataUrl();
fr1 = makeFrame(ctx, makeVect(400,0), makeVect(400, 0), makeVect(0, 400));
img.onload = function(){
ctx.save();
newPainter = cornerSplit(imagePainter,5);
newPainter(fr1);
ctx.restore();
ctx.save();
newPainter(flipHorizLeft(fr1));
ctx.restore();
ctx.save();
newPainter(flipVertDown(fr1));
ctx.restore();
ctx.save();
newPainter(flipVertDown(flipHorizLeft(fr1)));
}
}
<input type="button" name="recurseImage" id='recurseImage' value="Recurse It" onClick"recurseImage()"/>
My hope is to allow the user to simply click a btn that will send the newly created canvas image into this function and display the 'recursedImage' in a separate window that the user can save as a png file if they desire. I pre-thank you and any suggestions would be very much appreciated.