[core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
This commit is contained in:
@@ -148,7 +148,7 @@ public:
|
||||
LatLng latLngForPixel(const ScreenCoordinate&) const;
|
||||
|
||||
// Annotations
|
||||
void addAnnotationImage(const std::string&, std::unique_ptr<style::Image>);
|
||||
void addAnnotationImage(std::unique_ptr<style::Image>);
|
||||
void removeAnnotationImage(const std::string&);
|
||||
double getTopOffsetPixelsForAnnotationImage(const std::string&);
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
std::unique_ptr<style::Layer> removeLayer(const std::string& layerID);
|
||||
|
||||
// Images
|
||||
void addImage(const std::string&, std::unique_ptr<style::Image>);
|
||||
void addImage(std::unique_ptr<style::Image>);
|
||||
void removeImage(const std::string&);
|
||||
const style::Image* getImage(const std::string&);
|
||||
|
||||
|
||||
@@ -3,12 +3,16 @@
|
||||
#include <mbgl/util/image.hpp>
|
||||
#include <mbgl/util/immutable.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
class Image {
|
||||
public:
|
||||
Image(PremultipliedImage&&, float pixelRatio, bool sdf = false);
|
||||
Image(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false);
|
||||
|
||||
std::string getID() const;
|
||||
|
||||
const PremultipliedImage& getImage() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user