Trying to draw a rectangle inside the canvas