diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-04-11 20:31:18 +0300 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-14 12:33:13 -0700 |
commit | 98e2e59e5e963dbc5451a19233d942b429a74855 (patch) | |
tree | 2eb68e34823d07a7402e0c633e4c3e9510b76b4c /src/mbgl/text/quads.cpp | |
parent | 2f4d162debd7e4accfc0b20360058304dce40801 (diff) | |
download | qtlocation-mapboxgl-98e2e59e5e963dbc5451a19233d942b429a74855.tar.gz |
[core] Safeguard PositionedIcon usage via optional
Diffstat (limited to 'src/mbgl/text/quads.cpp')
-rw-r--r-- | src/mbgl/text/quads.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/text/quads.cpp b/src/mbgl/text/quads.cpp index 188f88655d..bf7791581a 100644 --- a/src/mbgl/text/quads.cpp +++ b/src/mbgl/text/quads.cpp @@ -22,12 +22,12 @@ SymbolQuad getIconQuad(const Anchor& anchor, const float layoutTextSize, const style::SymbolPlacementType placement, const Shaping& shapedText) { - auto image = *(shapedIcon.image); + auto image = *shapedIcon.image(); const float border = 1.0; - auto left = shapedIcon.left - border; + auto left = shapedIcon.left() - border; auto right = left + image.pos.w / image.relativePixelRatio; - auto top = shapedIcon.top - border; + auto top = shapedIcon.top() - border; auto bottom = top + image.pos.h / image.relativePixelRatio; Point<float> tl; Point<float> tr; @@ -67,7 +67,7 @@ SymbolQuad getIconQuad(const Anchor& anchor, bl = {left, bottom}; } - float angle = shapedIcon.angle; + float angle = shapedIcon.angle(); if (placement == style::SymbolPlacementType::Line) { assert(static_cast<unsigned int>(anchor.segment) < line.size()); const GeometryCoordinate &prev= line[anchor.segment]; |