Adds function for getting canvas width and height.