diff --git a/tests/visual_tests/grids/text-wrap-512-512-1.0-grid-reference.json b/tests/visual_tests/grids/text-wrap-512-512-1.0-grid-reference.json new file mode 100644 index 000000000..1f3b63330 --- /dev/null +++ b/tests/visual_tests/grids/text-wrap-512-512-1.0-grid-reference.json @@ -0,0 +1,139 @@ +{ + "keys": [ + "", + "2", + "1", + "3" + ], + "data": {}, + "grid": [ + " !!! ", + " !!! ", + " !!!! ", + " !! !! ", + " ", + " ", + " ", + " !! !! ", + " !!! ", + " !!! ", + " !!! ", + " !! !! ", + " !! !! ", + " ", + " ", + " ", + " !! !! ", + " !!! ", + " !! ", + " !!! ", + " !! !! ", + " !! ! ", + " ", + " ", + " !! ! ", + " !!!! ", + " !!! ", + " !!! ", + " !!!! ", + " !! !! ", + " ", + " ", + " ", + " !! !! ", + " !!! ", + " !!! ", + " !!! ", + " !! !! ", + " !! !! ", + " ", + " ", + " ", + " !! !! ", + " !!! ", + " !! ", + " !!! ", + " !! !! ", + " !! ! ", + " ", + " ", + " !! ! ", + " !!!! ", + " !!! ", + " !!! ## ## ## ## #### ", + " !!!! ### ### #### ", + " !! !! ## ## ## ", + " #### ### #### ", + " ## ## ## ## #### ", + " ## ## ## # ## ## ", + " ", + " ", + " # ## ## ## ## ## ", + " #### ## ## #### ", + " ### ### ## ", + " ## ### ## ", + " #### ### #### ", + " ## ## ## ## ## ## ", + " ", + " ", + " ", + " # ## ## ## ## ## ", + " #### #### #### ", + " ## ### ## $ $$ ", + " ## ### ### $$$$ ", + " #### #### #### $$$ ", + " ## ## ## ## ## # $$ ", + " $$$$ ", + " $$ $$ ", + " ", + " ", + " ", + " $$ $ $$ $$ ", + " $$$$ $$$$ ", + " $$ $$$ ", + " $$$ $$$ ", + " $$$$ $$$$ ", + " $$ $$ $$ $$ ", + " ", + " ", + " ", + " $$$$ $$ $$ ", + " $$$$ $$$ ", + " $$ $$ ", + " $$$$ $$$ ", + " $$$$ $$ $$ ", + " $$ $$ $ $$ ", + " ", + " ", + " $ $$ $ $$ ", + " $$$$ $$$$ ", + " $$$ $$$ ", + " $$ $$ ", + " $$$$ $$$$ ", + " $$ $$ $$ $$ ", + " ", + " ", + " ", + " $$ $ $$ $$ ", + " $$$$ $$$$ ", + " $$ $$$ ", + " $$$ $$$ ", + " $$$$ $$$$ ", + " $$ $$ $$ $$ ", + " ", + " ", + " ", + " $$$$ $$ $$ ", + " $$$$ $$$ ", + " $$ $$ ", + " $$$$ $$$ ", + " $$$$ $$ $$ ", + " $$ $$ $ $$ ", + " ", + " ", + " $ $$ $ $$ ", + " $$$$ $$$$ ", + " $$$ $$$ ", + " $$ $$ " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/text-wrap-512-512-2.0-grid-reference.json b/tests/visual_tests/grids/text-wrap-512-512-2.0-grid-reference.json new file mode 100644 index 000000000..6d6c4ba22 --- /dev/null +++ b/tests/visual_tests/grids/text-wrap-512-512-2.0-grid-reference.json @@ -0,0 +1,139 @@ +{ + "keys": [ + "", + "2", + "3", + "1" + ], + "data": {}, + "grid": [ + " !!!!! ", + " !!!!! ", + " !!!!!! ", + " !!!!!!! ", + " !!!! !!!! ", + " !!!! !!! ", + " !!! !!!! ", + " ", + " ", + " ", + " ", + " ", + " !!! !!! ", + " !!! !!!! ", + " !!!! !!! ", + " !!!!!!!! ", + " !!!!!! ", + " !!!!! ", + " !!!! ", + " !!!!! ", + " !!!!!!! ", + " !!! !!!! ", + " !!!! !!! ", + " !!!! !!!! ", + " !!! !!! ", + " ", + " ", + " ", + " ", + " ", + " !!! !!!! ", + " !!!! !!! ", + " !!! !!!! ", + " !!!!!!! ", + " !!!!! ", + " !!!! #### ### ", + " !!!!! ### #### ", + " !!!!!! ######## ", + " !!!!!!! ###### ", + " !!!! !!!! ##### ", + " !!! !!!! #### ", + " !!!! !!! $$$ $$$ $$$ $$$ $$$ $$$$ ###### ", + " $$$$ $$$$ $$$$ $$$$ $$$$ $$$ ###### ", + " $$$$$$$$ $$$$$$$$ $$$ $$$$ ######## ", + " $$$$$$ $$$$$$ $$$$$$$ #### #### ", + " $$$$$$ $$$$$$ $$$$$ ### ### ", + " $$$$ $$$$ $$$$ ### ### ", + " !!!! !!! $$$$ $$$$$ $$$$$ ", + " !!! !!! $$$$$$ $$$$$$ $$$$$$$ ", + " !!!! !!!! $$$$$$$$ $$$$$$$$ $$$ $$$ ", + " !!!!!!! $$$ $$$ $$$$ $$$ $$$$ $$$$ ", + " !!!!! $$$$ $$$$ $$$ $$$$ $$$$ $$$$ ", + " !!!!! $$$ $$$ $$$$ $$$ $$$ $$$ ### ### ### #### ", + " !!!!! #### #### #### ### ", + " !!!!!! ### #### ### #### ", + " !!!!!!! ####### ####### ", + " !!!! !!!! ##### ##### ", + " !!!! !!! #### #### ", + " !!! !!!! $$$ $$$ $$$ $$$ $$$ $$$ ##### ##### ", + " $$$$ $$$$ $$$$ $$$$ $$$ $$$$ ###### ####### ", + " $$$$ $$$ $$$ $$$$ $$$$ $$$$ ####### ### ### ", + " $$$$$$$ $$$$$$$ $$$$$$$ #### #### #### #### ", + " $$$$$$ $$$$$$ $$$$$$ ### #### #### #### ", + " $$$$ $$$$ $$$$$ #### ### ### ### ", + " $$$$ $$$$ $$$$$ ", + " !!! !!!! $$$$$$ $$$$$$ $$$$$ ", + " !!!! !!! $$$$$$$$ $$$$$$$ $$$$$$$ ", + " !!!!!!!! $$$ $$$ $$$ $$$$ $$$$ $$$$ ", + " !!!!!! $$$$ $$$$ $$$$ $$$$ $$$ $$$ ", + " !!!!! $$$ $$$ $$$$ $$$ $$$$ $$$$ ### ### ### ### ", + " !!!! #### #### ### #### ", + " !!!!! ### #### #### #### ", + " !!!!!!! ####### ####### ", + " !!! !!!! ###### ##### ", + " !!!! !!! #### ##### ", + " !!!! !!!! #### ##### ", + " !!! !!! $$$ $$$$ $$$ $$$ $$$$ $$$ ###### ##### ", + " $$$$ $$$ $$$$ $$$$ $$$ $$$$ ####### ####### ", + " $$$$$$$$ $$$ $$$ $$$$$$$$ ### #### #### #### ", + " $$$$$$ $$$$$$$ $$$$$$ ### #### ### ### ", + " $$$$$ $$$$$ $$$$$ #### ### #### #### ", + " $$$$ $$$$ $$$$ ", + " !!! !!!! $$$$$ $$$$$ $$$$$ ", + " !!!! !!! $$$$$$$ $$$$$$$ $$$$$$ ", + " !!! !!!! $$$ $$$$ $$$$ $$$ $$$$$$$$ ", + " !!!!!!! $$$$ $$$ $$$ $$$$ $$$ $$$$ ", + " !!!!! $$$$ $$$$ $$$$ $$$$ $$$ $$$ ", + " !!!! $$$ $$$ $$$ $$$ $$$ $$$ #### ### #### ### ", + " !!!!! ### #### ### #### ", + " !!!!!! ######## ######## ", + " !!!!!!! ###### ###### ", + " !!!! !!!! ##### ##### ", + " !!! !!!! #### #### ", + " !!!! !!! ###### ###### ", + " ###### ###### ", + " ######## ######## ", + " #### #### #### #### ", + " ### ### ### ### ", + " ### ### ### ### ", + " ", + " ", + " ", + " ", + " ", + " ### ### ### #### ", + " #### #### #### ### ", + " ### #### ### #### ", + " ####### ####### ", + " ###### ##### ", + " #### #### ", + " ##### ##### ", + " ###### ####### ", + " ####### ### ### ", + " #### #### #### #### ", + " ### #### #### #### ", + " #### ### ### ### ", + " ", + " ", + " ", + " ", + " ", + " ### ### ### ### ", + " #### #### ### #### ", + " ### #### #### #### ", + " ####### ####### ", + " ###### ###### ", + " #### ##### ", + " #### ##### " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/images/text-wrap-512-512-1.0-agg-reference.png b/tests/visual_tests/images/text-wrap-512-512-1.0-agg-reference.png new file mode 100644 index 000000000..5921aaa1d Binary files /dev/null and b/tests/visual_tests/images/text-wrap-512-512-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/text-wrap-512-512-1.0-cairo-reference.png b/tests/visual_tests/images/text-wrap-512-512-1.0-cairo-reference.png new file mode 100644 index 000000000..cf2f69429 Binary files /dev/null and b/tests/visual_tests/images/text-wrap-512-512-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/text-wrap-512-512-2.0-agg-reference.png b/tests/visual_tests/images/text-wrap-512-512-2.0-agg-reference.png new file mode 100644 index 000000000..8bb802703 Binary files /dev/null and b/tests/visual_tests/images/text-wrap-512-512-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/text-wrap-512-512-2.0-cairo-reference.png b/tests/visual_tests/images/text-wrap-512-512-2.0-cairo-reference.png new file mode 100644 index 000000000..d20074885 Binary files /dev/null and b/tests/visual_tests/images/text-wrap-512-512-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/styles/text-wrap.xml b/tests/visual_tests/styles/text-wrap.xml new file mode 100644 index 000000000..64fb6c345 --- /dev/null +++ b/tests/visual_tests/styles/text-wrap.xml @@ -0,0 +1,87 @@ + + + + 512,512 + + + + + 1 + + + + { + "type": "FeatureCollection", + + "features": [ + + { "type": "Feature", + "properties": { + "label": "this,that", + "wrap-character":" ", + "repeat-wrap-character":false + }, + "geometry" : { "type": "Point", "coordinates": [ 2.5, 2.5 ] } + }, + { "type": "Feature", + "properties": { + "label": "this-that", + "wrap-character":"X", + "repeat-wrap-character":false + }, + "geometry" : { "type": "Point", "coordinates": [ 0, 5 ] } + }, + { "type": "Feature", + "properties": { + "label": "this-that", + "wrap-character":"X", + "repeat-wrap-character":true + }, + "geometry" : { "type": "Point", "coordinates": [ 5, 0 ] } + } + ] + } + + + geojson + + + + + + + + + frame + + csv + +x,y +-1,-1 +6,-1 +-1,6 +6,6 + + + + +