Check if pixel to write lays in legal area.