summaryrefslogtreecommitdiff
path: root/include/mbgl/style/image.hpp
blob: 53cab23c2f85fdc9c06ca7bd04371bb7f706d6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#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;

    class Impl;
    Immutable<Impl> impl;
};

} // namespace style
} // namespace mbgl