[core] Add DDS support for {text,icon}-size (#8593)

* Update gl-js and generate style code

* Factor out packUint8Pair() helper function

* Draft implementation of DDS for {text,icon}-size

Ports https://github.com/mapbox/mapbox-gl-js/pull/4455

* Fix text-size/composite-function-line-placement test

* Refactor to PaintPropertyBinders-like strategy

* Dedupe gl::Program construction

* Use exponential function base for interpolation

* Dedupe coveringZoomStops method

* Fixup tests

* Fix CI errors (hidden within #if block)
This commit is contained in:
Anand Thakker
2017-04-06 15:29:59 -04:00
committed by GitHub
parent f9cc044357
commit 693c9f3641
37 changed files with 1009 additions and 219 deletions

View File

@@ -1526,11 +1526,11 @@ public class PropertyFactory {
/**
* Scale factor for icon. 1 is original size, 3 triples the size.
*
* @param <Z> the zoom parameter type
* @param function a wrapper {@link CameraFunction} for Float
* @param <T> the function input type
* @param function a wrapper function for Float
* @return property wrapper around a Float function
*/
public static <Z extends Number> PropertyValue<CameraFunction<Z, Float>> iconSize(CameraFunction<Z, Float> function) {
public static <T> PropertyValue<Function<T, Float>> iconSize(Function<T, Float> function) {
return new LayoutPropertyValue<>("icon-size", function);
}
@@ -1802,11 +1802,11 @@ public class PropertyFactory {
/**
* Font size.
*
* @param <Z> the zoom parameter type
* @param function a wrapper {@link CameraFunction} for Float
* @param <T> the function input type
* @param function a wrapper function for Float
* @return property wrapper around a Float function
*/
public static <Z extends Number> PropertyValue<CameraFunction<Z, Float>> textSize(CameraFunction<Z, Float> function) {
public static <T> PropertyValue<Function<T, Float>> textSize(Function<T, Float> function) {
return new LayoutPropertyValue<>("text-size", function);
}