summaryrefslogtreecommitdiff
path: root/include/llmr/map/transform.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-04-10 11:49:43 -0400
committerKonstantin Käfer <mail@kkaefer.com>2014-04-10 11:49:43 -0400
commiteb499e77c1f6cc77452cadd2445b7d99d1b6b7fa (patch)
treec41e27e63f9811335205f2f2c41081fe2191a12b /include/llmr/map/transform.hpp
parent524c8737e418c22e97ab7c3d269e456212662a14 (diff)
downloadqtlocation-mapboxgl-eb499e77c1f6cc77452cadd2445b7d99d1b6b7fa.tar.gz
fix linejoin drawing on retina
Diffstat (limited to 'include/llmr/map/transform.hpp')
-rw-r--r--include/llmr/map/transform.hpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/llmr/map/transform.hpp b/include/llmr/map/transform.hpp
index f43802ffaf..dbef17c1a1 100644
--- a/include/llmr/map/transform.hpp
+++ b/include/llmr/map/transform.hpp
@@ -22,6 +22,8 @@ public:
void updateAnimations();
void cancelAnimations();
+ void resize(uint16_t width, uint16_t height, uint16_t fb_width, uint16_t fb_height);
+
// Relative changes
void moveBy(double dx, double dy, double duration = 0);
void scaleBy(double ds, double cx = -1, double cy = -1, double duration = 0);
@@ -55,22 +57,30 @@ public:
// Temporary
box mapCornersToBox(uint32_t z) const;
+ // More getters
+ inline uint16_t getWidth() const { return width; }
+ inline uint16_t getHeight() const { return height; }
+ inline uint16_t getFramebufferWidth() const { return fb_width; }
+ inline uint16_t getFramebufferHeight() const { return fb_height; }
+ inline float getPixelRatio() const { return pixelRatio; }
+
private:
void setScaleXY(double new_scale, double xn, double yn, double duration = 0);
double pixel_x() const;
double pixel_y() const;
-public:
+private:
// logical dimensions
- uint32_t width = 0;
- uint32_t height = 0;
+ uint16_t width = 0;
+ uint16_t height = 0;
// physical (framebuffer) dimensions
- float fb_width = 0;
- float fb_height = 0;
+ uint16_t fb_width = 0;
+ uint16_t fb_height = 0;
float pixelRatio = 1;
+public:
bool rotating = false;
bool scaling = false;
bool panning = false;