Files
MapLibreParticleLab/include/mbgl/style/image.hpp
John Firebaugh cc1ea759a6 [core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
2017-05-16 12:26:35 -07:00

34 lines
650 B
C++

#pragma once
#include <mbgl/util/image.hpp>
#include <mbgl/util/immutable.hpp>
#include <string>
namespace mbgl {
namespace style {
class Image {
public:
Image(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false);
std::string getID() const;
const PremultipliedImage& getImage() const;
// Pixel ratio of the sprite image.
float getPixelRatio() const;
// Whether this image should be interpreted as a signed distance field icon.
bool isSdf() const;
float getWidth() const;
float getHeight() const;
class Impl;
Immutable<Impl> impl;
};
} // namespace style
} // namespace mbgl