MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / addSubpath

Method addSubpath

src/core/renderables/renderable_implementation.cpp:646–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646void 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
670PainterConfig AreaRenderable::getPainterConfig(const QPainterPath* clip_path) const
671{

Callers

nothing calls this directly

Calls 4

isCurveStartMethod · 0.80
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected