Pass canvas and context as arguments