From 7111a29c5a82c1e8e07dc7406fb422ae1bf05990 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 11 Nov 2016 13:49:21 -0800 Subject: [PATCH] Add test case for fill-pattern + data-driven fill-opacity --- .../property-function-pattern/expected.png | Bin 0 -> 2815 bytes .../property-function-pattern/style.json | 146 +++++++++++++++ .../expected.png | Bin 0 -> 3847 bytes .../style.json | 167 ++++++++++++++++++ 4 files changed, 313 insertions(+) create mode 100644 render-tests/fill-opacity/property-function-pattern/expected.png create mode 100644 render-tests/fill-opacity/property-function-pattern/style.json create mode 100644 render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png create mode 100644 render-tests/fill-opacity/zoom-and-property-function-pattern/style.json 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 0000000000000000000000000000000000000000..385e19dd33a582f49075753f98ec3706373db094 GIT binary patch literal 2815 zcmeH}`8OMA7soTTR8`41+77ihqLgWkP*W<1U1V%&saA|QmWnZ!iM>T>N(2$2(KpnP z##)V5Olql?CW<02j`a;DwN+zjh18Zeewx$Y<`3vS=ef%-&$;LO-1|9Cwgd$CH~s^ReZoY$ZJ)~&0H_Nq}iUI83EbsTk@m0Aw4W!r^)cO^K^18eq( zB6N=xb}4b&qCcrHcan;3p2#IAR8nFrOvW&w;`6(T1;UAbqo1cx*wVP1iLBuhNc17!lQM)4!u6^JP3x)}7A2A_NSPmn zg@H8`A#QUQ2T7TVa~{CO{bL}P*H=;b4IP>;g}?L4wbkW`-ppo&cfGy6F>Ga3JsR!3 zJ(>JK=zi8knOv%7WM(F(BPX-h%{PgW$L9=nU%SRIFfA#!6$$4pHZ1^rZC_|mo zEuDJh3T7*4_%}%TwAzcrh%gaY)iR<1V{UHsx_=Y$v+YZ*a!yysf}yEeNuMCDb=o`l z!Ml*nf<)P!Mj4pIcp(TLVp>Y%PQlW`qM{-$QQVhwKIckqnf3Ha?~ZV~e9pk&R}3ZvjznHi zMWgwAY_gl1Tk`pMrzjHQ@!M!#E2lCOIQ~H;*pE%Gy`>FYC(U^yk&Fq2=lRhSj&W z(((1Ht7T7|A!;z(kvNfH?RF~T`ST)Ykex2kz7V7^FI(y_Xq((nTc|Z$*gxpxqV@9= z+IR*{WOB)A9L@>Xk+d{BS6f?KNM&Bn!Q=09_#l!&CWxU-*fE+i9x;^nXJT}e3GCZq z9P|MEgS<>n&Ktf-3uh(oO^|0RAZ z8BeqqcM<}cQfh0l@!N4SunNH70~=g>^49YaNKGJuK~Qud;^ovvAn z<_Gol_189}RUS4Ryq9dv_RFTVv{!-W^!bxBPf&lbrUwq+A>F2PFjlvc)T0dxF3^K$ zi}dAmhVCmgNz2)+s~?N=B^W*aawK(MYJYJ6CCctvZW~;zZoXdpj2b#HB``L&`t#1L z;{`u!B(k+N`9(&BM_On-K;y^%K;yY4%Yjetq;dUWxic(0XC6#(_6qPsz`A~%S{|nJ z+LDBmsJpKomAhk_oBvpA-yP6%@We>y(O+!}&n1`&Yor?c2z`Prnzw;OQ4RKhL=J_2Gj@t~c~1uXV&qG`qU9xTw0bt1rDMg{hA!K+s+2!~IA1I*N-= zW~6KD(e#Q+N=}=b33w~m%)z@2 zNg$TO3n!mCJ#qaibAE~2sHMMh=w~FQj7D%=QcVLv3TFwldo*!Jbn((|66LR0oX<}V zVqrjskQ#-Sj7g-qe>>pg7MUz;He*N4=uzR7|4_K|Z{26sS_dqg1d}7-TFIp-JIUTm zF(d0_GlQN@D4#jAr1K5H-vIm#z~2D;?*Z%@@RjjMJJ3)UA`SPRGA;Sh0$dyr_D}2r GGyV_iyO+%X literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..1490af4f9f4da99481bf570a00945581c1e9d8ec GIT binary patch literal 3847 zcmY+Hc|4R`{Kp5=7(1DmtBJ8(#?588wixTsXtIoD6dA%*XvAD=lxvBsLqa5tF(C?3 zO&5_RGxo7I7+WOd(pZYr)$i$_-|P1~&vKsg$2sTwe4p?4`~E!X1V@~NsDda61d=#o zXX66&mOn2j1i04(QRaY7@QjU>Ta3WJ3h|>LkYxMM(MHEwC}PD|cwzqAP{W>X++R&C zM>X*(w)n#Po=pD>g?C^GcF4qpjd99Ki| zPAjo@CcQ3ncMgb~)XG^x9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