diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-10 17:18:18 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-14 12:29:01 -0600 |
commit | 94f011895c8e1bde36ee2ec235dbbcf2c994ac4c (patch) | |
tree | 9a9724792f87eb3c74aa2ac3d3114ca45d91471b /src/mbgl/text/glyph.hpp | |
parent | c6d5eaf47941162ee6166842d5434a0e3a6c33a0 (diff) | |
download | qtlocation-mapboxgl-94f011895c8e1bde36ee2ec235dbbcf2c994ac4c.tar.gz |
[core] Make Image safer
Provide Image::copy, which handles copying rectangles from a source to a destination, with thorough bounds checking.
Also fixes an indexing error in SpriteAtlas, where the top row of pixels in a wrapped image was copied from the wrong source row.
Diffstat (limited to 'src/mbgl/text/glyph.hpp')
-rw-r--r-- | src/mbgl/text/glyph.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index c89d045dfc..78ea613cd3 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -3,6 +3,7 @@ #include <mbgl/text/glyph_range.hpp> #include <mbgl/util/rect.hpp> #include <mbgl/util/traits.hpp> +#include <mbgl/util/image.hpp> #include <cstdint> #include <vector> @@ -89,7 +90,7 @@ public: uint32_t id = 0; // A signed distance field of the glyph with a border (see above). - std::string bitmap; + AlphaImage bitmap; // Glyph metrics GlyphMetrics metrics; |