Merge branch 'master' into glyphrange-master

Conflicts:
	bin/style.js
	src/text/placement.cpp
This commit is contained in:
Young Hahn
2014-05-29 11:59:12 -04:00
28 changed files with 389 additions and 183 deletions

View File

@@ -4,6 +4,11 @@ compiler:
- gcc
- clang
env:
matrix:
- BUILDTYPE=Release
- BUILDTYPE=Debug
cache:
- apt
- directories:
@@ -18,14 +23,20 @@ before_install:
install:
- ./setup-libraries.sh
- rm -rf mapnik-packaging/out/packages
before_script:
- if [ ${CXX} = "g++" ]; then export CXX="g++-4.8" ; fi
- if [[ ${CXX} == "g++" ]]; then export CXX="g++-4.8" ; fi
script:
- make llmr
- make linux
- make run-tests
- make llmr BUILDTYPE=${BUILDTYPE}
- make clean
- make linux BUILDTYPE=${BUILDTYPE}
- make clean
- make run-tests BUILDTYPE=${BUILDTYPE}
# TODO - port to linux
#- make run-headless-test BUILDTYPE=${BUILDTYPE}
notifications:
- hipchat: WB52YkcbCGMbNcStsGeaoRO7cyBSK4wX2ZHo2Y4b@GL

View File

@@ -9,7 +9,7 @@ all: llmr
# Builds the regular library
llmr: config.gypi llmr.gyp node
deps/run_gyp llmr.gyp --depth=. -Goutput_dir=.. --generator-output=./build/llmr -f make
make -C build/llmr V=$(V) llmr-x86
$(MAKE) -C build/llmr BUILDTYPE=$(BUILDTYPE) V=$(V) llmr-x86
node:
@if [ ! `which node` ]; then echo 'error: depends on node.js. please make sure node is on your PATH'; exit 1; fi;
@@ -20,7 +20,7 @@ build/test/Makefile: src common config.gypi test/test.gyp
deps/run_gyp test/test.gyp --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
test: build/test/Makefile
make -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) test
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) test
# Runs all test cases
run-tests: test
@@ -29,13 +29,13 @@ run-tests: test
done
test/%:
make -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) $*
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) $*
build/$(BUILDTYPE)/test_$*
# Only runs headless test case
run-headless-test: build/test/Makefile
make -C build/test BUILDTYPE=Debug V=$(V) headless
build/Debug/test_headless
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) headless
build/$(BUILDTYPE)/test_headless
##### Makefile builds ##########################################################
@@ -44,7 +44,7 @@ run-headless-test: build/test/Makefile
# Builds the linux app with make. This is also used by Travis CI
linux: config.gypi linux/llmr-app.gyp node
deps/run_gyp linux/llmr-app.gyp --depth=. -Goutput_dir=.. --generator-output=./build/linux -f make
make -C build/linux V=$(V) linuxapp
$(MAKE) -C build/linux BUILDTYPE=$(BUILDTYPE) V=$(V) linuxapp
# Executes the Linux binary
run-linux: linux
@@ -55,7 +55,7 @@ run-linux: linux
# Builds the OS X app with make.
osx: config.gypi macosx/llmr-app.gyp node
deps/run_gyp macosx/llmr-app.gyp --depth=. -Goutput_dir=.. --generator-output=./build/macosx -f make
make -C build/macosx V=$(V) osxapp
$(MAKE) -C build/macosx BUILDTYPE=$(BUILDTYPE) V=$(V) osxapp
# Executes the OS X binary
run-osx: osx

View File

@@ -716,14 +716,6 @@ module.exports = {
"type": "text",
"enabled": 4
},
"place_label_city_point": {
"source": "outdoors",
"layer": "place_label",
"field": "type",
"value": "city",
"type": "point",
"size": 4
},
"place_label_city": {
"source": "outdoors",
"layer": "place_label",
@@ -772,18 +764,48 @@ module.exports = {
"text_field": "name",
"path": "horizontal",
"font": "Open Sans Semibold, Arial Unicode MS Regular",
"fontSize": 14,
"fontSize": 18,
"feature_type": "point",
"type": "text"
},
"road_label": {
"road_label_1": {
"source": "outdoors",
"layer": "road_label",
"field": "class",
"value": ["motorway","main"],
"text_field": "name",
"path": "curve",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 13,
"fontSize": 18,
"feature_type": "line",
"type": "text",
"maxAngleDelta": 0.5
},
"road_label_2": {
"source": "outdoors",
"layer": "road_label",
"field": "class",
"value": ["street","street_limited"],
"text_field": "name",
"path": "curve",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 16,
"feature_type": "line",
"type": "text",
"maxAngleDelta": 0.5
},
"road_label_3": {
"source": "outdoors",
"layer": "road_label",
"field": "class",
"value": ["service","driveway","path"],
"text_field": "name",
"path": "curve",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 14,
"feature_type": "line",
"type": "text",
"maxAngleDelta": 0.5
@@ -814,7 +836,25 @@ module.exports = {
"layer": "poi_label",
"icon": "maki",
"field": "scalerank",
"value": [1, 2, 3],
"value": [1, 2],
"size": 12,
"type": "point"
},
"poi_3": {
"source": "outdoors",
"layer": "poi_label",
"icon": "maki",
"field": "scalerank",
"value": 3,
"size": 12,
"type": "point"
},
"poi_4": {
"source": "outdoors",
"layer": "poi_label",
"icon": "maki",
"field": "scalerank",
"value": 4,
"size": 12,
"type": "point"
},
@@ -827,7 +867,7 @@ module.exports = {
"size": 24,
"type": "point"
},
"poi_label": {
"poi_label_1-2": {
"source": "outdoors",
"layer": "poi_label",
"field": "scalerank",
@@ -839,10 +879,35 @@ module.exports = {
"path": "horizontal",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 12,
"fontSize": 11,
"feature_type": "point",
"type": "text",
"alwaysVisible": true
"type": "text"
},
"poi_label_3": {
"source": "outdoors",
"layer": "poi_label",
"field": "scalerank",
"value": 3,
"text_field": "name",
"path": "horizontal",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 10,
"feature_type": "point",
"type": "text"
},
"poi_label_4": {
"source": "outdoors",
"layer": "poi_label",
"field": "scalerank",
"value": 4,
"text_field": "name",
"path": "horizontal",
"padding": 2,
"font": "Open Sans Regular, Arial Unicode MS Regular",
"fontSize": 10,
"feature_type": "point",
"type": "text"
}
},
"structure": [
@@ -938,6 +1003,30 @@ module.exports = {
"name": "waterway_stream",
"bucket": "waterway_stream"
},
{
"name": "contour_line_loud",
"bucket": "contour_line_10"
},
{
"name": "contour_line_loud",
"bucket": "contour_line_5"
},
{
"name": "contour_line_regular",
"bucket": "contour_line_other"
},
{
"name": "building_shadow",
"bucket": "building"
},
{
"name": "building",
"bucket": "building"
},
{
"name": "building_wall",
"bucket": "building"
},
{
"name": "hillshade_full_highlight",
"bucket": "hillshade_full_highlight"
@@ -954,18 +1043,6 @@ module.exports = {
"name": "hillshade_full_shadow",
"bucket": "hillshade_full_shadow"
},
{
"name": "contour_line_loud",
"bucket": "contour_line_10"
},
{
"name": "contour_line_loud",
"bucket": "contour_line_5"
},
{
"name": "contour_line_regular",
"bucket": "contour_line_other"
},
{
"name": "barrier_line_gate",
"bucket": "barrier_line_gate"
@@ -1006,18 +1083,6 @@ module.exports = {
"name": "aeroway_taxiway",
"bucket": "aeroway_taxiway"
},
{
"name": "building_shadow",
"bucket": "building"
},
{
"name": "building",
"bucket": "building"
},
{
"name": "building_wall",
"bucket": "building"
},
{
"name": "tunnel_motorway_link_casing",
"bucket": "tunnel_motorway_link"
@@ -1294,10 +1359,6 @@ module.exports = {
"name": "state_label",
"bucket": "state_label"
},
{
"name": "place_label_city_point",
"bucket": "place_label_city_point"
},
{
"name": "place_label_city",
"bucket": "place_label_city"
@@ -1315,12 +1376,16 @@ module.exports = {
"bucket": "place_label_other"
},
{
"name": "poi_label",
"bucket": "poi_label"
"name": "road_label_1",
"bucket": "road_label_1"
},
{
"name": "road_label",
"bucket": "road_label"
"name": "road_label_2",
"bucket": "road_label_2"
},
{
"name": "road_label_3",
"bucket": "road_label_3"
},
{
"name": "contour_label",
@@ -1338,6 +1403,26 @@ module.exports = {
"name": "poi",
"bucket": "poi"
},
{
"name": "poi_label_1-2",
"bucket": "poi_label_1-2"
},
{
"name": "poi_3",
"bucket": "poi_3"
},
{
"name": "poi_label_3",
"bucket": "poi_label_3"
},
{
"name": "poi_4",
"bucket": "poi_4"
},
{
"name": "poi_label_4",
"bucket": "poi_label_4"
},
{
"name": "poi_aerodrome",
"bucket": "poi_aerodrome"
@@ -1571,12 +1656,27 @@ module.exports = {
{"z": 8, "val": 1},
{"z": 12, "val": 2}
],
"road_label_size": [
"road_label_1_size": [
"stops",
{"z": 0, "val": 12},
{"z": 13, "val": 11},
{"z": 14, "val": 12},
{"z": 15, "val": 13},
{"z": 22, "val": 13}
{"z": 16, "val": 14},
{"z": 17, "val": 16},
{"z": 18, "val": 18}
],
"road_label_2_size": [
"stops",
{"z": 13, "val": 11},
{"z": 14, "val": 12},
{"z": 16, "val": 14},
{"z": 18, "val": 16}
],
"road_label_3_size": [
"stops",
{"z": 15, "val": 10},
{"z": 16, "val": 12},
{"z": 18, "val": 14}
],
"fence_width": [
"stops",
@@ -1599,6 +1699,11 @@ module.exports = {
{"z": 19, "val": 12},
{"z": 20, "val": 24},
{"z": 21, "val": 48}
],
"country_label_size": [
"stops",
{"z": 1, "val": 14},
{"z": 12, "val": 24}
]
},
"classes": [
@@ -1753,7 +1858,7 @@ module.exports = {
"color": "#103",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -1766,7 +1871,7 @@ module.exports = {
"color": "#206",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -1779,7 +1884,7 @@ module.exports = {
"color": "#fffff3",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -1792,7 +1897,7 @@ module.exports = {
"color": "#ffd",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -2146,11 +2251,8 @@ module.exports = {
"country_label": {
"color": "country_text",
"stroke": "rgba(255,255,255,0.5)",
"size": [
"stops",
{"z": 6, "val": 14},
{"z": 12, "val": 24}
]
"strokeWidth": 0.4,
"size": "country_label_size"
},
"country_label_line": {
"color": "country_text",
@@ -2164,7 +2266,6 @@ module.exports = {
"marine_label_point_1": {
"color": "#a9c4c7",
"size": ["stops",
{"z": 0, "val": 20},
{"z": 3, "val": 20},
{"z": 4, "val": 25},
{"z": 5, "val": 30},
@@ -2175,7 +2276,6 @@ module.exports = {
"marine_label_point_2": {
"color": "#a9c4c7",
"size": ["stops",
{"z": 0, "val": 13},
{"z": 3, "val": 13},
{"z": 4, "val": 14},
{"z": 5, "val": 20},
@@ -2187,7 +2287,6 @@ module.exports = {
"marine_label_point_other": {
"color": "#a9c4c7",
"size": ["stops",
{"z": 0, "val": 12},
{"z": 3, "val": 12},
{"z": 4, "val": 13},
{"z": 5, "val": 15},
@@ -2209,9 +2308,6 @@ module.exports = {
{"z": 10, "val": 0}
]
},
"place_label_city_point": {
"color": "#4a4032"
},
"place_label_city": {
"color": "#444",
"strokeWidth": 0.4,
@@ -2223,20 +2319,12 @@ module.exports = {
{"z": 7, "val": 14},
{"z": 14.99, "val": 20},
{"z": 15, "val": 0}
],
"translate": [
0,
[
"stops",
{"z": 4, "val": 10},
{"z": 6, "val": 30},
{"z": 7, "val": 0}
]
]
},
"place_label_town": {
"color": "#716656",
"strokeWidth": 0.5,
"strokeWidth": 0.3,
"strokeBlur": 2,
"stroke": "text_stroke",
"size": [
"stops",
@@ -2248,7 +2336,8 @@ module.exports = {
},
"place_label_village": {
"color": "#635644",
"strokeWidth": 0.5,
"strokeWidth": 0.3,
"strokeBlur": 2,
"stroke": "text_stroke",
"size": [
"stops",
@@ -2264,18 +2353,32 @@ module.exports = {
"stroke": "text_stroke",
"size": [
"stops",
{"z": 0, "val": 10},
{"z": 14, "val": 11},
{"z": 15, "val": 12},
{"z": 16, "val": 14}
{"z": 13, "val": 11},
{"z": 14, "val": 12},
{"z": 16, "val": 14},
{"z": 18, "val": 18}
]
},
"road_label": {
"road_label_1": {
"color": "#585042",
"stroke": "land",
"strokeWidth": 0.6,
"strokeBlur": 2,
"size": "road_label_size"
"size": "road_label_1_size"
},
"road_label_2": {
"color": "#585042",
"stroke": "land",
"strokeWidth": 0.6,
"strokeBlur": 2,
"size": "road_label_2_size"
},
"road_label_3": {
"color": "#585042",
"stroke": "land",
"strokeWidth": 0.6,
"strokeBlur": 2,
"size": "road_label_3_size"
},
"water_label": {
"color": "water_dark",
@@ -2290,12 +2393,54 @@ module.exports = {
"poi": {
"antialias": false
},
"poi_label": {
"poi_3": {
"antialias": false,
"opacity": [
"stops",
{"z": 16.5, "val": 0},
{"z": 16.75, "val": 1}
]
},
"poi_4": {
"antialias": false,
"opacity": [
"stops",
{"z": 18.5, "val": 0},
{"z": 18.75, "val": 1}
]
},
"poi_label_1-2": {
"color": "#444",
"size": 11,
"stroke": "land",
"strokeWidth": 0.3,
"strokeBlur": 1,
"translate": [0, 14]
},
"poi_label_3": {
"color": "#444",
"size": 10,
"stroke": "land",
"strokeWidth": 0.6,
"strokeBlur": 2,
"strokeWidth": 0.3,
"strokeBlur": 1,
"translate": [0, 14],
"opacity": [
"stops",
{"z": 16.5, "val": 0},
{"z": 16.75, "val": 1}
]
},
"poi_label_4": {
"color": "#444",
"size": 10,
"opacity": [
"stops",
{"z": 18.5, "val": 0},
{"z": 18.75, "val": 1}
],
"stroke": "land",
"strokeWidth": 0.3,
"strokeBlur": 1,
"translate": [0, 14]
},
"poi_aerodrome": {
@@ -2314,7 +2459,7 @@ module.exports = {
"color": "land_night"
},
"admin_maritime_cover": {
"color": "#0a1347",
"color": "water_night",
"width": 5
},
"admin_maritime": {
@@ -2465,11 +2610,11 @@ module.exports = {
"color": "#103",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
{"z": 0, "val": 0.3},
{"z": 16, "val": 0.3},
{"z": 17, "val": 0.2},
{"z": 18, "val": 0.1}
]
@@ -2478,11 +2623,11 @@ module.exports = {
"color": "#206",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
{"z": 0, "val": 0.3},
{"z": 16, "val": 0.3},
{"z": 17, "val": 0.2},
{"z": 18, "val": 0.1}
]
@@ -2491,7 +2636,7 @@ module.exports = {
"color": "#fdfdad",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -2505,7 +2650,7 @@ module.exports = {
"color": "#ffe1b7",
"antialias": false,
"prerender": true,
"prerender-size": 512,
"prerender-size": 1024,
"prerender-blur": 1,
"opacity": [
"stops",
@@ -2854,12 +2999,9 @@ module.exports = {
},
"country_label": {
"color": "text_night",
"stroke": "text_stroke_night",
"size": [
"stops",
{"z": 6, "val": 14},
{"z": 12, "val": 24}
]
"stroke": "text2_stroke_night",
"strokeWidth": 0.4,
"size": "country_label_size"
},
"country_label_line": {
"color": "text_night",
@@ -2873,7 +3015,6 @@ module.exports = {
"marine_label_point_1": {
"color": "water_dark_night",
"size": ["stops",
{"z": 0, "val": 20},
{"z": 3, "val": 20},
{"z": 4, "val": 25},
{"z": 5, "val": 30},
@@ -2884,7 +3025,6 @@ module.exports = {
"marine_label_point_2": {
"color": "water_dark_night",
"size": ["stops",
{"z": 0, "val": 13},
{"z": 3, "val": 13},
{"z": 4, "val": 14},
{"z": 5, "val": 20},
@@ -2896,7 +3036,6 @@ module.exports = {
"marine_label_point_other": {
"color": "#a9c4c7",
"size": ["stops",
{"z": 0, "val": 12},
{"z": 3, "val": 12},
{"z": 4, "val": 13},
{"z": 5, "val": 15},
@@ -2918,13 +3057,10 @@ module.exports = {
{"z": 10, "val": 0}
]
},
"place_label_city_point": {
"color": "#ddd"
},
"place_label_city": {
"color": "#fff",
"strokeWidth": 0.4,
"stroke": "text_stroke_night",
"stroke": "text2_stroke_night",
"size": [
"stops",
{"z": 3.99, "val": 0},
@@ -2932,21 +3068,13 @@ module.exports = {
{"z": 7, "val": 14},
{"z": 14.99, "val": 20},
{"z": 15, "val": 0}
],
"translate": [
0,
[
"stops",
{"z": 4, "val": 10},
{"z": 6, "val": 30},
{"z": 7, "val": 0}
]
]
},
"place_label_town": {
"color": "text_night",
"strokeWidth": 0.5,
"stroke": "text_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 2,
"stroke": "text2_stroke_night",
"size": [
"stops",
{"z": 9, "val": 10},
@@ -2957,8 +3085,9 @@ module.exports = {
},
"place_label_village": {
"color": "text_night",
"strokeWidth": 0.5,
"stroke": "text_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 2,
"stroke": "text2_stroke_night",
"size": [
"stops",
{"z": 9, "val": 8},
@@ -2970,43 +3099,100 @@ module.exports = {
},
"place_label_other": {
"color": "text_night",
"stroke": "text_stroke_night",
"strokeWidth": 0.5,
"strokeBlur": 3,
"stroke": "text2_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 2,
"size": [
"stops",
{"z": 0, "val": 10},
{"z": 14, "val": 11},
{"z": 15, "val": 12},
{"z": 16, "val": 14}
{"z": 13, "val": 11},
{"z": 14, "val": 12},
{"z": 16, "val": 14},
{"z": 18, "val": 18}
]
},
"road_label": {
"road_label_1": {
"color": "text_night",
"stroke": "text2_stroke_night",
"strokeWidth": 0.5,
"strokeBlur": 3,
"size": "road_label_size"
"size": "road_label_1_size"
},
"road_label_2": {
"color": "text_night",
"stroke": "text2_stroke_night",
"strokeWidth": 0.5,
"strokeBlur": 3,
"size": "road_label_2_size"
},
"road_label_3": {
"color": "text_night",
"stroke": "text2_stroke_night",
"strokeWidth": 0.5,
"strokeBlur": 3,
"size": "road_label_3_size"
},
"water_label": {
"color": "water_dark_night",
"stroke": "text_stroke_night"
"strokeWidth": 0.8,
"stroke": "text2_stroke_night"
},
"waterway_label": {
"color": "land_night",
"color": "water_dark_night",
"strokeWidth": 0.8,
"stroke": "water_night"
"stroke": "text2_stroke_night"
},
"poi": {
"color": "white",
"antialias": false
},
"poi_label": {
"poi_3": {
"antialias": false,
"opacity": [
"stops",
{"z": 16.5, "val": 0},
{"z": 16.75, "val": 1}
]
},
"poi_4": {
"antialias": false,
"opacity": [
"stops",
{"z": 18.5, "val": 0},
{"z": 18.75, "val": 1}
]
},
"poi_label_1-2": {
"color": "#fff",
"size": 11,
"stroke": "text2_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 1,
"translate": [0, 14]
},
"poi_label_3": {
"color": "#fff",
"size": 10,
"stroke": "text2_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 2,
"strokeBlur": 1,
"translate": [0, 14],
"opacity": [
"stops",
{"z": 16.5, "val": 0},
{"z": 16.75, "val": 1}
]
},
"poi_label_4": {
"color": "#fff",
"size": 10,
"opacity": [
"stops",
{"z": 18.5, "val": 0},
{"z": 18.75, "val": 1}
],
"stroke": "text2_stroke_night",
"strokeWidth": 0.3,
"strokeBlur": 1,
"translate": [0, 14]
},
"poi_aerodrome": {

View File

@@ -39,7 +39,7 @@
namespace llmr {
namespace gl {
// Debug group markers, useful for debuggin on iOS
#if GL_EXT_debug_marker
#if defined(__APPLE__) && defined(DEBUG) && defined(GL_EXT_debug_marker)
// static int indent = 0;
inline void start_group(const std::string &str) {
glPushGroupMarkerEXT(0, str.c_str());

View File

@@ -11,7 +11,7 @@ public:
Collision();
~Collision();
PlacementProperty place(const PlacedGlyphs &boxes,
PlacementProperty place(const GlyphBoxes &boxes,
const CollisionAnchor &anchor,
float minPlacementScale, float maxPlacementScale,
float padding, bool horizontal, bool alwaysVisible);

BIN
ios/img/Icon-40.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

BIN
ios/img/Icon-40@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
ios/img/iTunesArtwork.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

View File

@@ -16,6 +16,7 @@ ensure_dep cmake
ensure_dep automake
ensure_dep autoconf
ensure_dep pkg-config
ensure_dep node
if [ ${UNAME} = 'Darwin' ]; then
ensure_dep makedepend
ensure_dep glibtool
@@ -27,10 +28,12 @@ fi
if [[ $MISSING_DEPS != "" ]]; then
if [ ${UNAME} = 'Darwin' ]; then
echo "Missing build deps: ${MISSING_DEPS}"
echo 'Please run "brew install autoconf automake libtool makedepend cmake pkg-config" and then re-run ./setup-libraries.sh'
echo 'Please run "brew install autoconf automake libtool makedepend cmake pkg-config node"'
echo 'and then re-run ./setup-libraries.sh'
elif [ ${UNAME} = 'Linux' ]; then
echo "Missing build deps: ${MISSING_DEPS}"
echo 'Please run "sudo apt-get install automake libtool xutils-dev cmake pkg-config" and then re-run ./setup-libraries.sh'
echo 'Please run "sudo apt-get install automake libtool xutils-dev cmake pkg-config libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev nodejs-legacy"'
echo 'and then re-run ./setup-libraries.sh'
fi
exit 1
fi
@@ -74,8 +77,6 @@ source MacOSX.sh
if [ ! -d out/build-cpp11-libcpp-x86_64/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../include/ `pwd`/../../linux/ `pwd`/../../common/ ; fi
echo ' ...done'
rm -rf out/packages
./scripts/make_universal.sh
cd ../../
@@ -86,15 +87,13 @@ cd ../../
elif [ ${UNAME} = 'Linux' ]; then
source Linux.sh
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libglfw3.a ] ; then ./scripts/build_glfw.sh ; fi
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libssl.a ] ; then ./scripts/build_openssl.sh ; fi
if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libcurl.a ] ; then ./scripts/build_curl.sh ; fi
if [ ! -d out/build-cpp11-libstdcpp-gcc-x86_64/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../include/ `pwd`/../../linux/ `pwd`/../../common/ ; fi
rm -rf out/packages
cd ../../
./configure \
--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64/lib/pkgconfig \

View File

@@ -53,7 +53,7 @@ Collision::Collision() : cTree(new Tree()), hTree(new Tree()) {
CollisionAnchor{m, m}, 1, {{M_PI * 2, 0}}, false, 2);
}
GlyphBox getMergedGlyphs(const PlacedGlyphs &placed_glyphs, bool horizontal,
GlyphBox getMergedGlyphs(const GlyphBoxes &boxes, bool horizontal,
const CollisionAnchor &anchor) {
GlyphBox mergedGlyphs;
const float inf = std::numeric_limits<float>::infinity();
@@ -62,28 +62,28 @@ GlyphBox getMergedGlyphs(const PlacedGlyphs &placed_glyphs, bool horizontal,
mergedGlyphs.anchor = anchor;
CollisionRect &box = mergedGlyphs.box;
for (const PlacedGlyph &placed_glyph : placed_glyphs) {
const CollisionRect &gbox = placed_glyph.glyphBox.box;
for (const GlyphBox &glyph : boxes) {
const CollisionRect &gbox = glyph.box;
box.tl.x = util::min(box.tl.x, gbox.tl.x);
box.tl.y = util::min(box.tl.y, gbox.tl.y);
box.br.x = util::max(box.br.x, gbox.br.x);
box.br.y = util::max(box.br.y, gbox.br.y);
mergedGlyphs.minScale =
util::max(mergedGlyphs.minScale, placed_glyph.glyphBox.minScale);
util::max(mergedGlyphs.minScale, glyph.minScale);
}
return mergedGlyphs;
}
PlacementProperty Collision::place(const PlacedGlyphs &placed_glyphs,
PlacementProperty Collision::place(const GlyphBoxes &boxes,
const CollisionAnchor &anchor,
float minPlacementScale,
float maxPlacementScale, float padding,
bool horizontal, bool alwaysVisible) {
float minScale = std::numeric_limits<float>::infinity();
for (const PlacedGlyph &placed_glyph : placed_glyphs) {
minScale = util::min(minScale, placed_glyph.glyphBox.minScale);
for (const GlyphBox &glyphBox : boxes) {
minScale = util::min(minScale, glyphBox.minScale);
}
minPlacementScale = util::max(minPlacementScale, minScale);
@@ -92,11 +92,9 @@ PlacementProperty Collision::place(const PlacedGlyphs &placed_glyphs,
// for horizontal labels.
GlyphBoxes glyphs;
if (horizontal) {
glyphs.push_back(getMergedGlyphs(placed_glyphs, horizontal, anchor));
glyphs.push_back(getMergedGlyphs(boxes, horizontal, anchor));
} else {
for (const PlacedGlyph &placed_glyph : placed_glyphs) {
glyphs.push_back(placed_glyph.glyphBox);
}
glyphs = boxes;
}
// Calculate bboxes for all the glyphs

View File

@@ -136,7 +136,8 @@ void getSegmentGlyphs(std::back_insert_iterator<GlyphInstances> glyphs,
}
}
PlacedGlyphs getGlyphs(Anchor &anchor, float advance, const Shaping &shaping,
void getGlyphs(PlacedGlyphs &glyphs, GlyphBoxes &boxes,
Anchor &anchor, float advance, const Shaping &shaping,
const GlyphPositions &face, float fontScale,
bool horizontal, const std::vector<Coordinate> &line,
float maxAngleDelta, float rotate) {
@@ -153,8 +154,6 @@ PlacedGlyphs getGlyphs(Anchor &anchor, float advance, const Shaping &shaping,
// origin.x -= advance;
// }
PlacedGlyphs glyphs;
const uint32_t buffer = 3;
for (const GlyphPlacement &placed : shaping) {
@@ -226,23 +225,26 @@ PlacedGlyphs getGlyphs(Anchor &anchor, float advance, const Shaping &shaping,
fontScale * util::max(tl.y, tr.y, bl.y, br.y)};
}
GlyphBox glyphBox = GlyphBox{
box,
// Prevent label from extending past the end of the line
util::max(instance.minScale, anchor.scale),
instance.maxScale,
instance.anchor,
horizontal};
// Remember the glyph for later insertion.
glyphs.emplace_back(PlacedGlyph{
tl, tr, bl, br, glyph.rect,
static_cast<float>(
std::fmod((anchor.angle + rotate + instance.offset + 2 * M_PI),
(2 * M_PI))),
GlyphBox{box, instance.minScale, instance.maxScale,
instance.anchor, horizontal}});
std::fmod((anchor.angle + rotate + instance.offset + 2 * M_PI), (2 * M_PI))),
glyphBox});
if (instance.offset == 0.0f) {
boxes.emplace_back(glyphBox);
}
}
}
// Prevent label from extending past the end of the line
for (PlacedGlyph &g : glyphs) {
g.glyphBox.minScale = util::max(g.glyphBox.minScale, anchor.scale);
}
return glyphs;
}
void Placement::addFeature(TextBucket& bucket,
@@ -280,15 +282,16 @@ void Placement::addFeature(TextBucket& bucket,
}
for (Anchor anchor : anchors) {
PlacedGlyphs glyphs =
getGlyphs(anchor, advance, shaping, face, fontScale, horizontal,
PlacedGlyphs glyphs;
GlyphBoxes boxes;
getGlyphs(glyphs, boxes, anchor, advance, shaping, face, fontScale, horizontal,
line, maxAngleDelta, rotate);
PlacementProperty place =
collision.place(glyphs, anchor, anchor.scale, maxPlacementScale,
collision.place(boxes, anchor, anchor.scale, maxPlacementScale,
padding, horizontal, info.alwaysVisible);
if (place) {
bucket.addGlyphs(glyphs, place.zoom, place.rotationRange,
zoom - zOffset);
bucket.addGlyphs(glyphs, place.zoom, place.rotationRange, zoom - zOffset);
}
}
}

View File

@@ -11,6 +11,15 @@
#include <uv.h>
namespace llmr {
namespace platform {
void notify_map_change() {
// no-op
}
}}
class View : public llmr::View {
public:
void make_active() {