| 644 | } |
| 645 | |
| 646 | void AreaRenderable::addSubpath(const VirtualPath& virtual_path) |
| 647 | { |
| 648 | auto& flags = virtual_path.coords.flags; |
| 649 | auto& coords = virtual_path.coords; |
| 650 | Q_ASSERT(!flags.data().empty()); |
| 651 | |
| 652 | auto i = virtual_path.first_index; |
| 653 | path.moveTo(coords[i]); |
| 654 | for (++i; i <= virtual_path.last_index; ++i) |
| 655 | { |
| 656 | if (flags[i-1].isCurveStart()) |
| 657 | { |
| 658 | Q_ASSERT(i+2 < coords.size()); |
| 659 | path.cubicTo(coords[i], coords[i+1], coords[i+2]); |
| 660 | i += 2; |
| 661 | } |
| 662 | else |
| 663 | { |
| 664 | path.lineTo(coords[i]); |
| 665 | } |
| 666 | } |
| 667 | path.closeSubpath(); |
| 668 | } |
| 669 | |
| 670 | PainterConfig AreaRenderable::getPainterConfig(const QPainterPath* clip_path) const |
| 671 | { |
nothing calls this directly
no test coverage detected