1 #include <mbgl/style/image.hpp> 2 #include <mbgl/style/image_impl.hpp> 3 #include <mbgl/util/exception.hpp> 4 5 namespace mbgl { 6 namespace style { 7 Image(std::string id,PremultipliedImage && image,const float pixelRatio,bool sdf)8Image::Image(std::string id, 9 PremultipliedImage &&image, 10 const float pixelRatio, 11 bool sdf) 12 : baseImpl(makeMutable<Impl>(std::move(id), std::move(image), pixelRatio, sdf)) { 13 } 14 getID() const15std::string Image::getID() const { 16 return baseImpl->id; 17 } 18 19 Image::Image(const Image&) = default; 20 getImage() const21const PremultipliedImage& Image::getImage() const { 22 return baseImpl->image; 23 } 24 isSdf() const25bool Image::isSdf() const { 26 return baseImpl->sdf; 27 } 28 getPixelRatio() const29float Image::getPixelRatio() const { 30 return baseImpl->pixelRatio; 31 } 32 33 } // namespace style 34 } // namespace mbgl 35