Scaling relations for contour lines of rough surfaces