| 283 | } |
| 284 | |
| 285 | m2::RectD PathTextHandle::GetPixelRect(ScreenBase const & screen, bool perspective) const |
| 286 | { |
| 287 | m2::PointD const pixelPivot(screen.GtoP(m_globalPivot)); |
| 288 | |
| 289 | if (perspective) |
| 290 | { |
| 291 | if (IsBillboard()) |
| 292 | { |
| 293 | m2::RectD r = GetPixelRect(screen, false); |
| 294 | m2::PointD pixelPivotPerspective = screen.PtoP3d(pixelPivot); |
| 295 | r.Offset(-pixelPivot); |
| 296 | r.Offset(pixelPivotPerspective); |
| 297 | |
| 298 | return r; |
| 299 | } |
| 300 | return GetPixelRectPerspective(screen); |
| 301 | } |
| 302 | |
| 303 | m2::RectD result; |
| 304 | for (gpu::TextDynamicVertex const & v : m_buffer) |
| 305 | result.Add(pixelPivot + m2::PointD(glsl::ToPoint(v.m_normal))); |
| 306 | |
| 307 | return result; |
| 308 | } |
| 309 | |
| 310 | void PathTextHandle::GetPixelShape(ScreenBase const & screen, bool perspective, Rects & rects) const |
| 311 | { |