summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-08-26 15:24:16 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-10-17 10:44:38 -0700
commit4603ca037cab2d0f732285ce9e006744ad3118d6 (patch)
tree0c14ef89bfc59a4501f63fb34e89bfc8ce6ccb01 /include
parent48a310406621957db4154e844d28e98f460a0226 (diff)
downloadqtlocation-mapboxgl-4603ca037cab2d0f732285ce9e006744ad3118d6.tar.gz
background-image support
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/transform_state.hpp8
-rw-r--r--include/mbgl/style/property_key.hpp3
-rw-r--r--include/mbgl/style/style_properties.hpp1
-rw-r--r--include/mbgl/util/mat3.hpp2
4 files changed, 12 insertions, 2 deletions
diff --git a/include/mbgl/map/transform_state.hpp b/include/mbgl/map/transform_state.hpp
index 5b3b7d3755..ed49dc3e99 100644
--- a/include/mbgl/map/transform_state.hpp
+++ b/include/mbgl/map/transform_state.hpp
@@ -29,10 +29,16 @@ public:
const std::array<uint16_t, 2> getFramebufferDimensions() const;
float getPixelRatio() const;
+ float worldSize() const;
+ float lngX(float lon) const;
+ float latY(float lat) const;
+ std::array<float, 2> locationCoordinate(float lon, float lat) const;
+
// Zoom
float getNormalizedZoom() const;
- int32_t getIntegerZoom() const;
double getZoom() const;
+ int32_t getIntegerZoom() const;
+ double getZoomFraction() const;
double getScale() const;
// Rotation
diff --git a/include/mbgl/style/property_key.hpp b/include/mbgl/style/property_key.hpp
index 28aa800607..cbf9ad2ac5 100644
--- a/include/mbgl/style/property_key.hpp
+++ b/include/mbgl/style/property_key.hpp
@@ -61,7 +61,8 @@ enum class PropertyKey {
RasterFade,
BackgroundOpacity,
- BackgroundColor
+ BackgroundColor,
+ BackgroundImage
};
}
diff --git a/include/mbgl/style/style_properties.hpp b/include/mbgl/style/style_properties.hpp
index 20200a0dd7..0a5e993411 100644
--- a/include/mbgl/style/style_properties.hpp
+++ b/include/mbgl/style/style_properties.hpp
@@ -94,6 +94,7 @@ struct BackgroundProperties {
inline BackgroundProperties() {}
float opacity = 1.0f;
Color color = {{ 0, 0, 0, 1 }};
+ std::string image;
};
typedef mapbox::util::variant<
diff --git a/include/mbgl/util/mat3.hpp b/include/mbgl/util/mat3.hpp
index d44b1435d3..fa40751764 100644
--- a/include/mbgl/util/mat3.hpp
+++ b/include/mbgl/util/mat3.hpp
@@ -32,6 +32,8 @@ typedef std::array<float, 9> mat3;
namespace matrix {
void identity(mat3& out);
+void translate(mat3& out, const mat3& a, float x, float y);
+void rotate(mat3& out, const mat3& a, float rad);
void scale(mat3& out, const mat3& a, float x, float y);
}