MCPcopy Create free account
hub / github.com/comaps/comaps / RenderDebug

Method RenderDebug

libs/drape/render_bucket.cpp:134–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void RenderBucket::RenderDebug(ref_ptr<GraphicsContext> context, ScreenBase const & screen,
135 ref_ptr<DebugRenderer> debugRectRenderer) const
136{
137 ASSERT(!debugRectRenderer || !debugRectRenderer->IsEnabled() || m_overlay.empty(), (debugRectRenderer, debugRectRenderer->IsEnabled(), m_overlay.empty()));
138
139 for (auto const & handle : m_overlay)
140 {
141 if (!screen.PixelRect().IsIntersect(handle->GetPixelRect(screen, false)))
142 continue;
143
144 auto const & rects = handle->GetExtendedPixelShape(screen);
145 for (auto const & rect : rects)
146 {
147 if (screen.isPerspective() && !screen.PixelRectIn3d().IsIntersect(m2::RectD(rect)))
148 continue;
149
150 auto color = dp::Color::Green();
151 if (!handle->IsVisible())
152 color = handle->IsReady() ? dp::Color::Red() : dp::Color::Yellow();
153
154 debugRectRenderer->DrawRect(context, screen, rect, color);
155 }
156 }
157}
158} // namespace dp

Callers 3

RenderTextMethod · 0.80
RenderStubsMethod · 0.80
RenderMethod · 0.80

Calls 9

ASSERTFunction · 0.85
isPerspectiveMethod · 0.80
IsReadyMethod · 0.80
DrawRectMethod · 0.80
IsEnabledMethod · 0.45
emptyMethod · 0.45
IsIntersectMethod · 0.45
GetPixelRectMethod · 0.45
IsVisibleMethod · 0.45

Tested by

no test coverage detected