1 #pragma once 2 3 #include <mbgl/util/image.hpp> 4 5 #include <string> 6 #include <memory> 7 #include <vector> 8 9 namespace mbgl { 10 11 namespace style { 12 class Image; 13 } // namespace style 14 15 // Extracts an individual image from a spritesheet from the given location. 16 std::unique_ptr<style::Image> createStyleImage(const std::string& id, 17 const PremultipliedImage&, 18 uint32_t srcX, 19 uint32_t srcY, 20 uint32_t srcWidth, 21 uint32_t srcHeight, 22 double ratio, 23 bool sdf); 24 25 // Parses an image and an associated JSON file and returns the sprite objects. 26 std::vector<std::unique_ptr<style::Image>> parseSprite(const std::string& image, const std::string& json); 27 28 } // namespace mbgl 29