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

Method SetRect

libs/drape_frontend/debug_rect_renderer.cpp:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void DebugRectRenderer::SetRect(ref_ptr<dp::GraphicsContext> context, m2::RectF const & rect, ScreenBase const & screen)
87{
88 std::vector<float> vertices;
89 PixelPointToScreenSpace(screen, rect.LeftBottom(), vertices);
90 PixelPointToScreenSpace(screen, rect.LeftTop(), vertices);
91 PixelPointToScreenSpace(screen, rect.RightTop(), vertices);
92 PixelPointToScreenSpace(screen, rect.RightBottom(), vertices);
93 PixelPointToScreenSpace(screen, rect.LeftBottom(), vertices);
94
95 ASSERT_LESS_OR_EQUAL(m_currentRectMesh, m_rectMeshes.size(), ());
96 if (m_currentRectMesh == m_rectMeshes.size())
97 m_rectMeshes.emplace_back(CreateMesh(context, m_program, std::move(vertices), "DebugRect"));
98 else
99 m_rectMeshes[m_currentRectMesh]->UpdateBuffer(context, 0 /* bufferInd */, vertices);
100}
101
102void DebugRectRenderer::DrawRect(ref_ptr<dp::GraphicsContext> context, ScreenBase const & screen,
103 m2::RectF const & rect, dp::Color const & color)

Callers

nothing calls this directly

Calls 9

PixelPointToScreenSpaceFunction · 0.85
CreateMeshFunction · 0.85
LeftBottomMethod · 0.80
LeftTopMethod · 0.80
RightTopMethod · 0.80
RightBottomMethod · 0.80
sizeMethod · 0.45
emplace_backMethod · 0.45
UpdateBufferMethod · 0.45

Tested by

no test coverage detected