| 730 | } |
| 731 | |
| 732 | void Path2d::appendSegment( SegmentType segmentType, const vec2 *points ) |
| 733 | { |
| 734 | mSegments.push_back( segmentType ); |
| 735 | // we only copy all of the segments points when we are empty. ie lineto -> line when we are empty |
| 736 | if( mPoints.empty() ) |
| 737 | std::copy( &points[0], &points[sSegmentTypePointCounts[segmentType]+1], std::back_inserter( mPoints ) ); |
| 738 | else |
| 739 | std::copy( &points[1], &points[sSegmentTypePointCounts[segmentType]+1], std::back_inserter( mPoints ) ); |
| 740 | } |
| 741 | |
| 742 | void Path2d::removeSegment( size_t segment ) |
| 743 | { |
no test coverage detected