Segmentation and Line Filling of 2D Shapes