summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-12-08 10:05:58 +0100
committerFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-12-08 11:36:39 +0100
commit89d4c40d927388f44e00e004e8a22db2d1b2eeab (patch)
tree212e6a7052bb0e01a7e9436bb2016894d15920c6 /platform/darwin
parent01ff94a6ebb5788e9c39abaa260fcd06bcbd41d6 (diff)
downloadqtlocation-mapboxgl-89d4c40d927388f44e00e004e8a22db2d1b2eeab.tar.gz
[ios, macos] renamed raster-hue-rotate
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/scripts/style-spec-cocoa-conventions-v8.json3
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h4
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.mm6
-rw-r--r--platform/darwin/test/MGLRasterStyleLayerTests.m8
4 files changed, 12 insertions, 9 deletions
diff --git a/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json b/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json
index 0a1aa90493..a144871a67 100644
--- a/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json
+++ b/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json
@@ -5,7 +5,8 @@
},
"paint_raster": {
"raster-brightness-min": "minimum-raster-brightness",
- "raster-brightness-max": "maximum-raster-brightness"
+ "raster-brightness-max": "maximum-raster-brightness",
+ "raster-hue-rotate": "raster-hue-rotation"
},
"paint_line": {
"line-dasharray": "line-dash-pattern"
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index e1b88900b0..916a0128d6 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -56,8 +56,10 @@ NS_ASSUME_NONNULL_BEGIN
This property is measured in degrees.
The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+
+ This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-hue-rotate"><code>raster-hue-rotate</code></a> paint property in the Mapbox Style Specification.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotate;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotation;
/**
The opacity at which the image will be drawn.
diff --git a/platform/darwin/src/MGLRasterStyleLayer.mm b/platform/darwin/src/MGLRasterStyleLayer.mm
index d54f027432..1bb5c33c28 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.mm
+++ b/platform/darwin/src/MGLRasterStyleLayer.mm
@@ -127,14 +127,14 @@
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterHueRotate:(MGLStyleValue<NSNumber *> *)rasterHueRotate {
+- (void)setRasterHueRotation:(MGLStyleValue<NSNumber *> *)rasterHueRotation {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterHueRotate);
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterHueRotation);
_rawLayer->setRasterHueRotate(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterHueRotate {
+- (MGLStyleValue<NSNumber *> *)rasterHueRotation {
MGLAssertStyleLayerIsValid();
auto propertyValue = _rawLayer->getRasterHueRotate() ?: _rawLayer->getDefaultRasterHueRotate();
diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.m b/platform/darwin/test/MGLRasterStyleLayerTests.m
index 84fd0fe3e5..197f1d4723 100644
--- a/platform/darwin/test/MGLRasterStyleLayerTests.m
+++ b/platform/darwin/test/MGLRasterStyleLayerTests.m
@@ -20,7 +20,7 @@
layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumber];
layer.rasterContrast = [MGLRuntimeStylingHelper testNumber];
layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumber];
- layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumber];
+ layer.rasterHueRotation = [MGLRuntimeStylingHelper testNumber];
layer.rasterOpacity = [MGLRuntimeStylingHelper testNumber];
layer.rasterSaturation = [MGLRuntimeStylingHelper testNumber];
@@ -30,7 +30,7 @@
XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.rasterHueRotation, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumber]);
@@ -38,7 +38,7 @@
layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterContrast = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumberFunction];
- layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.rasterHueRotation = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterSaturation = [MGLRuntimeStylingHelper testNumberFunction];
@@ -46,7 +46,7 @@
XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.rasterHueRotation, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumberFunction]);
}