Added check for whether we can paint a square if its above
the canvas