diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-05 14:48:07 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-10 11:15:49 -0800 |
commit | 06033885b78eee2c4bb2cba476594f793cac5979 (patch) | |
tree | 3f66e6493df9061f4989bf208266fb20c4f12ded /platform/darwin | |
parent | 3fd95b4e850ba9a68637061b20f374387c64f35e (diff) | |
download | qtlocation-mapboxgl-06033885b78eee2c4bb2cba476594f793cac5979.tar.gz |
[ios, macos, android] Commit accumulated `make style-code` updates
Manually ignoring all heatmap and hillshade related changes.
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/src/MGLCircleStyleLayer.h | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLFillExtrusionStyleLayer.h | 5 | ||||
-rw-r--r-- | platform/darwin/src/MGLFillStyleLayer.h | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLLineStyleLayer.h | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLRasterStyleLayer.h | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLRasterStyleLayer.mm | 18 | ||||
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.h | 44 | ||||
-rw-r--r-- | platform/darwin/test/MGLRasterStyleLayerTests.mm | 9 |
8 files changed, 34 insertions, 61 deletions
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h index ea95f6beef..86143894b1 100644 --- a/platform/darwin/src/MGLCircleStyleLayer.h +++ b/platform/darwin/src/MGLCircleStyleLayer.h @@ -42,7 +42,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleScaleAlignment) { }; /** - Controls the translation reference point. + Controls the frame of reference for `MGLCircleStyleLayer.circleTranslation`. Values of this type are used in the `MGLCircleStyleLayer.circleTranslationAnchor` property. @@ -489,7 +489,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslate __attribute__((unavailable("Use circleTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `circleTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLCircleTranslationAnchorMap`. Set this property diff --git a/platform/darwin/src/MGLFillExtrusionStyleLayer.h b/platform/darwin/src/MGLFillExtrusionStyleLayer.h index c4fb9aa77e..02d6b2ff88 100644 --- a/platform/darwin/src/MGLFillExtrusionStyleLayer.h +++ b/platform/darwin/src/MGLFillExtrusionStyleLayer.h @@ -8,7 +8,8 @@ NS_ASSUME_NONNULL_BEGIN /** - Controls the translation reference point. + Controls the frame of reference for + `MGLFillExtrusionStyleLayer.fillExtrusionTranslation`. Values of this type are used in the `MGLFillExtrusionStyleLayer.fillExtrusionTranslationAnchor` property. @@ -313,7 +314,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillExtrusionTranslate __attribute__((unavailable("Use fillExtrusionTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `fillExtrusionTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLFillExtrusionTranslationAnchorMap`. Set this diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h index 6e3297bdec..e385256aae 100644 --- a/platform/darwin/src/MGLFillStyleLayer.h +++ b/platform/darwin/src/MGLFillStyleLayer.h @@ -8,7 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** - Controls the translation reference point. + Controls the frame of reference for `MGLFillStyleLayer.fillTranslation`. Values of this type are used in the `MGLFillStyleLayer.fillTranslationAnchor` property. @@ -322,7 +322,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslate __attribute__((unavailable("Use fillTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `fillTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLFillTranslationAnchorMap`. Set this property to diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h index 46025ddbf0..e48951d97b 100644 --- a/platform/darwin/src/MGLLineStyleLayer.h +++ b/platform/darwin/src/MGLLineStyleLayer.h @@ -58,7 +58,7 @@ typedef NS_ENUM(NSUInteger, MGLLineJoin) { }; /** - Controls the translation reference point. + Controls the frame of reference for `MGLLineStyleLayer.lineTranslation`. Values of this type are used in the `MGLLineStyleLayer.lineTranslationAnchor` property. @@ -515,7 +515,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslate __attribute__((unavailable("Use lineTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `lineTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineTranslationAnchorMap`. Set this property to diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h index 53a6a98b8a..e808bb5242 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.h +++ b/platform/darwin/src/MGLRasterStyleLayer.h @@ -155,13 +155,6 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterFadeDuration; /** - The transition affecting any changes to this layer’s `rasterFadeDuration` property. - - This property corresponds to the `raster-fade-duration-transition` property in the style JSON file format. -*/ -@property (nonatomic) MGLTransition rasterFadeDurationTransition; - -/** Rotates hues around the color wheel. This property is measured in degrees. diff --git a/platform/darwin/src/MGLRasterStyleLayer.mm b/platform/darwin/src/MGLRasterStyleLayer.mm index c63fd23529..277b2b82a6 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.mm +++ b/platform/darwin/src/MGLRasterStyleLayer.mm @@ -175,24 +175,6 @@ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue); } -- (void)setRasterFadeDurationTransition:(MGLTransition )transition { - MGLAssertStyleLayerIsValid(); - - mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; - self.rawLayer->setRasterFadeDurationTransition(options); -} - -- (MGLTransition)rasterFadeDurationTransition { - MGLAssertStyleLayerIsValid(); - - mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getRasterFadeDurationTransition(); - MGLTransition transition; - transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); - transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); - - return transition; -} - - (void)setRasterHueRotation:(MGLStyleValue<NSNumber *> *)rasterHueRotation { MGLAssertStyleLayerIsValid(); diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index ffb95dfc73..f6d5323e22 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -68,14 +68,15 @@ typedef NS_ENUM(NSUInteger, MGLIconPitchAlignment) { */ MGLIconPitchAlignmentViewport, /** - Automatically matches the value of `iconRotationAlignment`. + Automatically matches the value of + `MGLSymbolStyleLayer.iconRotationAlignment`. */ MGLIconPitchAlignmentAuto, }; /** - In combination with `symbolPlacement`, determines the rotation behavior of - icons. + In combination with `MGLSymbolStyleLayer.symbolPlacement`, determines the + rotation behavior of icons. Values of this type are used in the `MGLSymbolStyleLayer.iconRotationAlignment` property. @@ -89,7 +90,7 @@ typedef NS_ENUM(NSUInteger, MGLIconRotationAlignment) { MGLIconRotationAlignmentMap, /** Produces icons whose x-axes are aligned with the x-axis of the viewport, - regardless of the value of `symbolPlacement`. + regardless of the value of `MGLSymbolStyleLayer.symbolPlacement`. */ MGLIconRotationAlignmentViewport, /** @@ -226,14 +227,15 @@ typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) { */ MGLTextPitchAlignmentViewport, /** - Automatically matches the value of `textRotationAlignment`. + Automatically matches the value of + `MGLSymbolStyleLayer.textRotationAlignment`. */ MGLTextPitchAlignmentAuto, }; /** - In combination with `symbolPlacement`, determines the rotation behavior of the - individual glyphs forming the text. + In combination with `MGLSymbolStyleLayer.symbolPlacement`, determines the + rotation behavior of the individual glyphs forming the text. Values of this type are used in the `MGLSymbolStyleLayer.textRotationAlignment` property. @@ -247,7 +249,7 @@ typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) { MGLTextRotationAlignmentMap, /** Produces glyphs whose x-axes are aligned with the x-axis of the viewport, - regardless of the value of `symbolPlacement`. + regardless of the value of `MGLSymbolStyleLayer.symbolPlacement`. */ MGLTextRotationAlignmentViewport, /** @@ -281,7 +283,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTransform) { }; /** - Controls the translation reference point. + Controls the frame of reference for `MGLSymbolStyleLayer.iconTranslation`. Values of this type are used in the `MGLSymbolStyleLayer.iconTranslationAnchor` property. @@ -298,7 +300,7 @@ typedef NS_ENUM(NSUInteger, MGLIconTranslationAnchor) { }; /** - Controls the translation reference point. + Controls the frame of reference for `MGLSymbolStyleLayer.textTranslation`. Values of this type are used in the `MGLSymbolStyleLayer.textTranslationAnchor` property. @@ -443,8 +445,11 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement __attribute__((unavailable("Use iconIgnoresPlacement instead."))); /** - Name of image in sprite to use for drawing an image background. A string with - {tokens} replaced, referencing the data property to pull from. + Name of image in sprite to use for drawing an image background. Within literal + values, attribute names enclosed in curly brackets (e.g. `{token}`) are + replaced with the value of the named attribute. Expressions do not support this + syntax; for equivalent functionality in expressions, use + `stringByAppendingString:` and key path expressions. This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-image"><code>icon-image</code></a> @@ -646,8 +651,8 @@ MGL_EXPORT /** Scales the original size of the icon by the provided factor. The new point size - of the image will be the original point size multiplied by `iconSize`. 1 is the - original size; 3 triples the size of the image. + of the image will be the original point size multiplied by `iconScale`. 1 is + the original size; 3 triples the size of the image. This property is measured in factor of the original icon sizes. @@ -935,9 +940,10 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing; /** - Value to use for a text label. Feature properties are specified using tokens - like {field_name}. (Token replacement is only supported for literal - `textField` values--not for property functions.) + Value to use for a text label. Within literal values, attribute names enclosed + in curly brackets (e.g. `{token}`) are replaced with the value of the named + attribute. Expressions do not support this syntax; for equivalent functionality + in expressions, use `stringByAppendingString:` and key path expressions. The default value of this property is an `MGLStyleValue` object containing the empty string. Set this property to `nil` to reset it to the default value. @@ -1716,7 +1722,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslate __attribute__((unavailable("Use iconTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `iconTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconTranslationAnchorMap`. Set this property to @@ -2041,7 +2047,7 @@ MGL_EXPORT @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslate __attribute__((unavailable("Use textTranslation instead."))); /** - Controls the translation reference point. + Controls the frame of reference for `textTranslation`. The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextTranslationAnchorMap`. Set this property to diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.mm b/platform/darwin/test/MGLRasterStyleLayerTests.mm index 7b0757eeb6..26526e3a6c 100644 --- a/platform/darwin/test/MGLRasterStyleLayerTests.mm +++ b/platform/darwin/test/MGLRasterStyleLayerTests.mm @@ -193,15 +193,6 @@ XCTAssertThrowsSpecificNamed(layer.rasterFadeDuration = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it"); functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeInterval compositeStops:@{@18: constantStyleValue} attributeName:@"" options:nil]; XCTAssertThrowsSpecificNamed(layer.rasterFadeDuration = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it"); - // Transition property test - layer.rasterFadeDurationTransition = transitionTest; - auto toptions = rawLayer->getRasterFadeDurationTransition(); - XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay); - XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration); - - MGLTransition rasterFadeDurationTransition = layer.rasterFadeDurationTransition; - XCTAssertEqual(rasterFadeDurationTransition.delay, transitionTest.delay); - XCTAssertEqual(rasterFadeDurationTransition.duration, transitionTest.duration); } // raster-hue-rotate |