Commit graph

13374 commits

Author SHA1 Message Date
Artem Pavlenko
ffb6db7b4d CSS color: relax grammar to allow floating point percentages and mixed case e.g 'rGB' names 2021-05-04 15:07:32 +01:00
Artem Pavlenko
fb2e45c579 Upgrade to ICU 58.1 2021-04-28 17:05:24 +01:00
Artem Pavlenko
88a15daf93 Fix parse_svg_value 2021-04-22 11:36:10 +01:00
Artem Pavlenko
a1cb756fa0 SVG parse_svg_value: update is_percent only if parsing successful 2021-04-19 18:02:24 +01:00
Artem Pavlenko
3031b7cf6a SVG parse_svg_value/parse_font_size: re-initialise default val on parser failure 2021-04-19 08:55:39 +01:00
Artem Pavlenko
4ff25eb2a8 remove token 2021-04-16 17:26:44 +01:00
Artem Pavlenko
21fd41b9a9
Merge pull request #4225 from mapnik/svg-rendering-improvements
SVG rendering improvements
2021-04-16 09:51:25 +01:00
Artem Pavlenko
7c5f4539e1 Fix error message + update SVG parser unit test 2021-04-15 16:29:05 +01:00
Artem Pavlenko
fd204874ec svg2png - avoid writing to an empty image 2021-04-15 15:53:04 +01:00
Artem Pavlenko
654a3c1f9f SVG : refactor and simplify width/height+viewBox logic (https://www.w3.org/TR/SVG11/struct.html#SVGElement) + check font_sizes_ size before accesing last element 2021-04-15 15:38:59 +01:00
Artem Pavlenko
0feabeb7e8 SVG circle: ignore when r = 0 2021-04-13 13:48:05 +01:00
Artem Pavlenko
55370c3453 Update visual data 2021-04-13 10:26:39 +01:00
Artem Pavlenko
f293371a9d SVG rendering improvements:
* process `font-size` attributes and use them to scale `em` units
* fix default `color-stop` value
* store `viewBox` and use it to calculate `%` values correctly
* add more absolute/relative values
* default `DPI`:96
* default `font-size`: 10
* process style attributes on `<svg>` element
* use viewBox `width`, `height` and `normalized_diagonal` for relevant length values
* apply scale factor to gradient transforms
2021-04-13 09:19:33 +01:00
Artem Pavlenko
9c2132f895 Fix gradient transform calc (apply scale factor) 2021-04-13 09:17:48 +01:00
Artem Pavlenko
ff8c411749 Use DPI=96 + add absolute and relative sizes + add missing value units 2021-04-12 14:16:39 +01:00
Artem Pavlenko
4f783f61ed Init by value 2021-04-12 14:16:09 +01:00
Artem Pavlenko
6bab4e56fd Move MAPNIK_DECL to the front (ref https://github.com/mapnik/mapnik/pull/4220#issuecomment-814259514) 2021-04-06 17:36:46 +01:00
Artem Pavlenko
8c3b9758eb
Merge pull request #4220 from mapnik/proj6
Simplify proj_transform_cache implementation
2021-04-06 11:58:44 +01:00
Artem Pavlenko
b974a4a683 Simplify proj_transform_cache implementation (ref https://github.com/mapnik/mapnik/pull/4191#issuecomment-813377082) 2021-04-06 10:30:12 +01:00
Artem Pavlenko
bb18a5ba0a
Merge pull request #4219 from mathisloge/proj_transform_fix
fixes proj_transform_cache incomplete type
2021-04-01 17:16:48 +01:00
Mathis Logemann
ee90425de1 fixes proj_transform_cache incomplete type for gcc 2021-04-01 17:57:20 +02:00
Artem Pavlenko
53669bc42e
Merge pull request #4202 from mapnik/proj6
Upgrade to new Proj APIs
2021-03-26 16:55:10 +00:00
Artem Pavlenko
3489bdbe36 rename PROJ_VERSION to MAPNIK_PROJ_VERSION to avoid clashes with libproj 2021-03-25 16:38:21 +00:00
Artem Pavlenko
f093d0cf6e Fix potential iterator out of range condition by using appropriate function (ref #4218) via @mathisloge
```
template< class InputIt1, class InputIt2, class BinaryPredicate >

bool equal( InputIt1 first1, InputIt1 last1,
            InputIt2 first2, InputIt2 last2,
            BinaryPredicate p );
```
2021-03-25 16:07:48 +00:00
Artem Pavlenko
5dfd1a24fc Fix potential iterator out of range condition by using appropriate function (ref #4218) via @mathisloge
```
template< class InputIt1, class InputIt2, class BinaryPredicate >

bool equal( InputIt1 first1, InputIt1 last1,
            InputIt2 first2, InputIt2 last2,
            BinaryPredicate p );
```
2021-03-25 16:03:15 +00:00
Artem Pavlenko
503b9c5bbf Move proj_transform_cache declarations and implementaion into separate translation unit (ref VC++ C2492) 2021-03-25 12:16:15 +00:00
Artem Pavlenko
c76f65a49a Add missing header (linux) 2021-03-24 11:44:56 +00:00
Artem Pavlenko
d756b534e3 Fix names and add welsh reference for good measure 2021-03-24 11:42:18 +00:00
Artem Pavlenko
2bb5bdb9fe Fix existing and add more transformation test + test for is_geographic (ref 3a302667a1) 2021-03-24 11:23:27 +00:00
Artem Pavlenko
f82ed08d6a Replace remaining MAPNIK_USE_PROJ4 -> MAPNIK_USE_PROJ 2021-03-24 11:22:32 +00:00
Artem Pavlenko
b24fc9a8da Remove proj4 related stuff 2021-03-24 11:21:50 +00:00
Artem Pavlenko
3a302667a1 Fix return value (MAPNIK_WEBMERCATOR_PROJ is not geographic SRS) 2021-03-24 09:42:52 +00:00
Artem Pavlenko
59aa5087fc upgrade libpq to 9.6.5 2021-03-22 16:03:08 +00:00
Artem Pavlenko
602948f783 Upgrade mason pkgs:
* libgdal 2.2.3
* libpng 1.6.32
* jpeg_turbo 1.5.2
* libtiff 4.0.8
2021-03-22 15:45:36 +00:00
Artem Pavlenko
5afe22030f Fix proj_version on macOS 2021-03-19 16:37:21 +00:00
Artem Pavlenko
9df7afd0a3 Add 'proj_version' check + define PROJ_MIN_VERSION as 7.2.0 2021-03-19 13:24:14 +00:00
Artem Pavlenko
6af16764aa proj - add version check based on major*10000+minor*100+patch format 2021-03-19 13:22:16 +00:00
Artem Pavlenko
6b9b42f314 Declare proj_cache_ thread_local static to allow mapnik::Map to be thread-safe under certain conditions + refactor
(benchmark/src/test_rendering_shared_map.cpp)
2021-03-18 16:05:58 +00:00
Artem Pavlenko
ebbd544d75 Add text to indicate if proj_transform is internal or external (libproj) 2021-03-18 16:05:09 +00:00
Artem Pavlenko
9c7e21fa47 Re-use proj_transform as creating a new one is extremely expensive on libproj >= 6 (NOTE: epsg:4326 and epsg:3857 are special cases which use internal implementations and are not expensive to create on stack). 2021-03-18 15:32:13 +00:00
Artem Pavlenko
199e609a79 Fix compiler warning - use non-reference type 'boost::tuples::cons<...>' 2021-03-16 11:49:53 +00:00
Artem Pavlenko
fbc6bec12a Update visual data references 2021-03-15 18:18:24 +00:00
Artem Pavlenko
56d63073b4 Update test 2021-03-15 18:10:09 +00:00
Artem Pavlenko
387d54fe9d Defer projection init 2021-03-15 18:09:21 +00:00
Artem Pavlenko
6099804559 Use POSIX definition of pi constant (M_PI) + define tau in terms of pi + better namings + remove deprecated proj4 style definitions 2021-03-15 18:06:26 +00:00
Artem Pavlenko
baad6b3819 Update data and data-visual to use epsg:XXXX syntax to define SRS (old proj4 syntax is not recommended in proj >=6) 2021-03-12 16:24:11 +00:00
Artem Pavlenko
c71bcdc92d update visual tests affected by switching to well_known_srs 2021-03-12 14:39:14 +00:00
Artem Pavlenko
f432204180 Update test/data-visual 2021-03-12 13:14:31 +00:00
Artem Pavlenko
68efb709ed Fix mason version 2021-03-11 15:16:31 +00:00
Artem Pavlenko
ec880947e0 fix merge artifacts 2021-03-11 15:04:53 +00:00