MCPcopy Create free account
hub / github.com/MapServer/MapServer / GetBounds

Method GetBounds

renderers/agg/src/clipper.cpp:670–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668//------------------------------------------------------------------------------
669
670IntRect ClipperBase::GetBounds()
671{
672 IntRect result;
673 LocalMinima* lm = m_MinimaList;
674 if (!lm)
675 {
676 result.left = result.top = result.right = result.bottom = 0;
677 return result;
678 }
679 result.left = lm->leftBound->xbot;
680 result.top = lm->leftBound->ybot;
681 result.right = lm->leftBound->xbot;
682 result.bottom = lm->leftBound->ybot;
683 while (lm)
684 {
685 if (lm->leftBound->ybot > result.bottom)
686 result.bottom = lm->leftBound->ybot;
687 TEdge* e = lm->leftBound;
688 for (;;) {
689 while (e->nextInLML)
690 {
691 if (e->xbot < result.left) result.left = e->xbot;
692 if (e->xbot > result.right) result.right = e->xbot;
693 e = e->nextInLML;
694 }
695 if (e->xbot < result.left) result.left = e->xbot;
696 if (e->xbot > result.right) result.right = e->xbot;
697 if (e->xtop < result.left) result.left = e->xtop;
698 if (e->xtop > result.right) result.right = e->xtop;
699 if (e->ytop < result.top) result.top = e->ytop;
700
701 if (e == lm->leftBound) e = lm->rightBound;
702 else break;
703 }
704 lm = lm->next;
705 }
706 return result;
707}
708
709
710//------------------------------------------------------------------------------

Callers 1

OffsetPolygonsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected