| 72 | } |
| 73 | |
| 74 | std::optional<m2::PointD> SelectionShape::GetPixelPosition(ScreenBase const & screen, int zoomLevel) const |
| 75 | { |
| 76 | if (!IsVisible()) |
| 77 | return {}; |
| 78 | |
| 79 | m2::PointD pos = m_position; |
| 80 | double posZ = m_positionZ; |
| 81 | if (!m_selectionGeometry.empty()) |
| 82 | { |
| 83 | pos = GetSelectionGeometryBoundingBox().Center(); |
| 84 | posZ = 0.0; |
| 85 | } |
| 86 | |
| 87 | m2::PointD const pt = screen.GtoP(pos); |
| 88 | if (!screen.IsReverseProjection3d(pt)) |
| 89 | return screen.PtoP3d(pt, -posZ); |
| 90 | return {}; |
| 91 | } |
| 92 | |
| 93 | void SelectionShape::Render(ref_ptr<dp::GraphicsContext> context, ref_ptr<gpu::ProgramManager> mng, |
| 94 | ScreenBase const & screen, int zoomLevel, FrameValues const & frameValues) |
no test coverage detected