#pragma once #include #include #include #include namespace mbgl { namespace style { class Image::Impl { public: Impl(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false, ImageStretches stretchX = {}, ImageStretches stretchY = {}, optional content = nullopt); const std::string id; PremultipliedImage image; // Pixel ratio of the sprite image. const float pixelRatio; // Whether this image should be interpreted as a signed distance field icon. const bool sdf; // Stretch areas of this image. const ImageStretches stretchX; const ImageStretches stretchY; // The space where text can be fit into this image. const optional content; }; } // namespace style enum class ImageType : bool { Icon, Pattern }; using ImageMap = std::unordered_map>; using ImageDependencies = std::unordered_map; using ImageRequestPair = std::pair; using ImageVersionMap = std::unordered_map; inline bool operator<(const Immutable& a, const Immutable& b) { return a->id < b->id; } } // namespace mbgl