diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2015-10-23 13:45:29 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2015-12-29 16:35:59 +0300 |
commit | 9b5abcbf1c69914bc337150a76fba361af3a83ca (patch) | |
tree | cad4d5d8cb5084640ca23c2e1fb869505b075001 /drape_frontend/text_shape.cpp | |
parent | 3a0d04035390416ee0fdcb7202d3e69c8e3f3281 (diff) |
Overlays clipping for perspective mode.
Conflicts:
drape/overlay_handle.cpp
drape/overlay_handle.hpp
drape/overlay_tree.cpp
drape_frontend/poi_symbol_shape.cpp
drape_frontend/text_shape.cpp
Diffstat (limited to 'drape_frontend/text_shape.cpp')
-rw-r--r-- | drape_frontend/text_shape.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drape_frontend/text_shape.cpp b/drape_frontend/text_shape.cpp index f3da22ff2a..dd9219b40a 100644 --- a/drape_frontend/text_shape.cpp +++ b/drape_frontend/text_shape.cpp @@ -27,8 +27,9 @@ public: dp::Anchor anchor, glsl::vec2 const & pivot, glsl::vec2 const & pxSize, glsl::vec2 const & offset, uint64_t priority, ref_ptr<dp::TextureManager> textureManager, - bool isOptional, gpu::TTextDynamicVertexBuffer && normals) - : TextHandle(id, text, anchor, priority, textureManager, move(normals)) + bool isOptional, gpu::TTextDynamicVertexBuffer && normals, + bool isBillboard = false) + : TextHandle(id, text, anchor, priority, textureManager, move(normals), isBillboard) , m_pivot(glsl::ToPoint(pivot)) , m_offset(glsl::ToPoint(offset)) , m_size(glsl::ToPoint(pxSize)) @@ -71,6 +72,11 @@ public: rects.push_back(m2::RectF(GetPixelRect(screen))); } + void GetPixelShapePerspective(const ScreenBase &screen, Rects &rects) const override + { + rects.push_back(m2::RectF(TextHandle::GetPixelRectPerspective(screen))); + } + bool IsBound() const override { return !m_isOptional; @@ -175,7 +181,8 @@ void TextShape::DrawSubStringPlain(StraightTextLayout const & layout, dp::FontDe GetOverlayPriority(), textures, isOptional, - move(dynamicBuffer)); + move(dynamicBuffer), + true); handle->SetOverlayRank(m_hasPOI ? (isPrimary ? dp::OverlayRank1 : dp::OverlayRank2) : dp::OverlayRank0); handle->SetExtendingSize(m_params.m_extendingSize); |