Added visibleRect check for xml dump