Drawing images with line segments