diff --git a/render-tests/fill-opacity/property-function-pattern/expected.png b/render-tests/fill-opacity/property-function-pattern/expected.png new file mode 100644 index 00000000..385e19dd Binary files /dev/null and b/render-tests/fill-opacity/property-function-pattern/expected.png differ diff --git a/render-tests/fill-opacity/property-function-pattern/style.json b/render-tests/fill-opacity/property-function-pattern/style.json new file mode 100644 index 00000000..96e74868 --- /dev/null +++ b/render-tests/fill-opacity/property-function-pattern/style.json @@ -0,0 +1,146 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "ignored": { + "native": "https://github.com/mapbox/mapbox-gl-native/issues/4860" + } + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon", + "fill-opacity": { + "property": "property", + "stops": [ + [ + 0, + 1 + ], + [ + 4, + 0 + ] + ] + } + } + } + ] +} diff --git a/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png b/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png new file mode 100644 index 00000000..1490af4f Binary files /dev/null and b/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png differ diff --git a/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json b/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json new file mode 100644 index 00000000..cc5af9fd --- /dev/null +++ b/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json @@ -0,0 +1,167 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "ignored": { + "native": "https://github.com/mapbox/mapbox-gl-native/issues/4860" + } + } + }, + "zoom": 0.1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon", + "fill-opacity": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 1 + ], + [ + { + "zoom": 0, + "value": 4 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 4 + }, + 0 + ] + ] + } + } + } + ] +}