| 308 | } |
| 309 | |
| 310 | void PathTextHandle::GetPixelShape(ScreenBase const & screen, bool perspective, Rects & rects) const |
| 311 | { |
| 312 | m2::PointD const pixelPivot(screen.GtoP(m_globalPivot)); |
| 313 | for (size_t quadIndex = 0; quadIndex < m_buffer.size(); quadIndex += 4) |
| 314 | { |
| 315 | m2::RectF r; |
| 316 | r.Add(m2::PointF(pixelPivot) + glsl::ToPoint(m_buffer[quadIndex].m_normal)); |
| 317 | r.Add(m2::PointF(pixelPivot) + glsl::ToPoint(m_buffer[quadIndex + 1].m_normal)); |
| 318 | r.Add(m2::PointF(pixelPivot) + glsl::ToPoint(m_buffer[quadIndex + 2].m_normal)); |
| 319 | r.Add(m2::PointF(pixelPivot) + glsl::ToPoint(m_buffer[quadIndex + 3].m_normal)); |
| 320 | |
| 321 | if (perspective) |
| 322 | { |
| 323 | if (IsBillboard()) |
| 324 | { |
| 325 | m2::PointD const pxPivotPerspective = screen.PtoP3d(pixelPivot); |
| 326 | |
| 327 | r.Offset(m2::PointF(-pixelPivot)); |
| 328 | r.Offset(m2::PointF(pxPivotPerspective)); |
| 329 | } |
| 330 | else |
| 331 | { |
| 332 | r = m2::RectF(GetPerspectiveRect(m2::RectD(r), screen)); |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | bool const needAddRect = perspective ? !screen.IsReverseProjection3d(m2::PointD(r.Center())) : true; |
| 337 | if (needAddRect) |
| 338 | rects.emplace_back(std::move(r)); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | void PathTextHandle::GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const |
| 343 | { |
nothing calls this directly
no test coverage detected