summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2017-10-03 11:31:30 -0400
committerFabian Guerra <fabian.guerra@mapbox.com>2017-10-03 11:31:30 -0400
commit9eaed012dd33b34758582907100ba748a850ca9f (patch)
tree3bc30525265e88d9399727154c49b356b1a80340
parent6beeb8787e196103846c9ba59f9d7894c8635634 (diff)
downloadqtlocation-mapboxgl-9eaed012dd33b34758582907100ba748a850ca9f.tar.gz
[ios, macos] Update snapshotter size documentation.
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.h3
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.mm5
2 files changed, 3 insertions, 5 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.h b/platform/darwin/src/MGLMapSnapshotter.h
index 1b43f9fc1e..be4258e0ad 100644
--- a/platform/darwin/src/MGLMapSnapshotter.h
+++ b/platform/darwin/src/MGLMapSnapshotter.h
@@ -56,9 +56,8 @@ MGL_EXPORT
#pragma mark - Configuring the Image
/**
- The size of the output image.
+ The size of the output image, measured in points.
- The image may be no less than 64 pixels wide and no less than 64 pixels tall.
*/
@property (nonatomic, readonly) CGSize size;
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm
index 8d94b40acf..edc6aaf00d 100644
--- a/platform/darwin/src/MGLMapSnapshotter.mm
+++ b/platform/darwin/src/MGLMapSnapshotter.mm
@@ -74,10 +74,9 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64;
// Size; taking into account the minimum texture size for OpenGL ES
// For non retina screens the ratio is 1:1 MGLSnapshotterMinimumPixelSize
-
mbgl::Size size = {
- static_cast<uint32_t>(MAX(options.size.width, MGLSnapshotterMinimumPixelSize/options.scale)),
- static_cast<uint32_t>(MAX(options.size.height, MGLSnapshotterMinimumPixelSize/options.scale))
+ static_cast<uint32_t>(MAX(options.size.width, MGLSnapshotterMinimumPixelSize)),
+ static_cast<uint32_t>(MAX(options.size.height, MGLSnapshotterMinimumPixelSize))
};
float pixelRatio = MAX(options.scale, 1);