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

Method AreaRenderable

src/core/renderables/renderable_implementation.cpp:617–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615// ### AreaRenderable ###
616
617AreaRenderable::AreaRenderable(const AreaSymbol* symbol, const PathPartVector& path_parts)
618 : Renderable(symbol->getColor())
619{
620 if (!path_parts.empty())
621 {
622 auto part = begin(path_parts);
623 if (part->size() > 2)
624 {
625 extent = part->path_coords.calculateExtent();
626 addSubpath(*part);
627
628 auto last = end(path_parts);
629 for (++part; part != last; ++part)
630 {
631 rectInclude(extent, part->path_coords.calculateExtent());
632 addSubpath(*part);
633 }
634 }
635 }
636 Q_ASSERT(extent.right() < 60000000); // assert if bogus values are returned
637}
638
639AreaRenderable::AreaRenderable(const AreaSymbol* symbol, const VirtualPath& path)
640 : Renderable(symbol->getColor())

Callers

nothing calls this directly

Calls 5

rectIncludeFunction · 0.85
getColorMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
calculateExtentMethod · 0.45

Tested by

no test coverage detected