Commit graph

4324 commits

Author SHA1 Message Date
artemp
0076a5a916 make hex parser strict (expecting two characters after \x) to avoid greedy parsing of trailing characters as in
"\xF0\x9F\x8D\xB7abc" ==>  ... + "\xB7" +  "abc" not "\xB7abc"
2017-03-01 10:34:16 +01:00
artemp
570126bd76 make hex parser strict (expecting two characters after \x) to avoid greedy parsing of trailing characters as in
"\xF0\x9F\x8D\xB7abc" ==>  ... + "\xB7" +  "abc" not "\xB7abc"
2017-03-01 10:27:12 +01:00
artemp
cbacaaf0c5 initialize to reasonable values. 2017-02-28 15:05:37 +01:00
artemp
1b67779290 implement color bitmap extraction/scaling/compositing into target pixmap 2017-02-28 15:04:49 +01:00
artemp
7c93514fbc avoid division by zero (units_per_EM is set to 0 for bitmap fonts) 2017-02-28 15:01:46 +01:00
artemp
8e97803e81 add color_font_ member 2017-02-28 14:59:14 +01:00
artemp
32e592fb7a use explicit const& 2017-02-22 12:33:18 +01:00
artemp
d9c81d46fd use else if 2017-02-20 12:12:22 +01:00
artemp
86e5f9305b quarantee glyphinfos has enough capacity to hold cluster 2017-02-17 17:16:36 +01:00
artemp
fbdff42d47 use std::vector<std::vector<T>> instead of std::map<unsigned,std::vector> to simplify lookups 2017-02-17 16:52:31 +01:00
artemp
20cafae780 ensure insert has worked 2017-02-17 15:40:37 +01:00
artemp
e55918788c fix test logic 2017-02-17 15:32:03 +01:00
artemp
302e4c75dd simplify further 2017-02-17 15:28:13 +01:00
artemp
fe7d1e2f53 simplify logic 2017-02-17 15:23:00 +01:00
artemp
49c28cb6ad new font fallback implementation - it is rather inefficient but attempting to do a right thing.
(NOTE: some visual text failures need further look to see if latest implementation is correct)
2017-02-17 14:20:32 +01:00
Mickey Rose
2587bb3a1d sql_utils: improved table_from_sql 2017-02-10 18:55:22 +01:00
Mickey Rose
a4e8ea21be sql_utils: deprecate flawed un-quote functions
unquote* just strip all quotes from both ends of the string,
and don't collapse inner quotes.

quote_attr doesn't duplicate inner quotes.
2017-02-10 18:55:22 +01:00
Mickey Rose
7b217133e2 sql_utils: on-the-fly quoting via operator << 2017-02-10 18:55:22 +01:00
artemp
755d178d20 alternative exaustive face fallback implementation ref #3534 #3559 2017-01-31 17:44:25 +01:00
artemp
d053bddb43 add support for PNG filters (http://www.libpng.org/pub/png/libpng-manual.txt) ref #3479 2017-01-26 15:45:08 +01:00
artemp
2ede054e93 c++ style - use pre-(de)increment operators by default 2017-01-26 14:19:28 +01:00
artemp
f13848e210 move box2.hpp and related files into geometry dir 2017-01-26 09:51:37 +01:00
artemp
a220bda05d check return value from std::fread 2017-01-13 14:38:00 +01:00
artemp
f76060274d Revert back again fixing a typo! (thanks @springmeyer 2f55f0962e (commitcomment-20461372))
"It doesn't work with GCC reverting back "disable [-Wunused-result] warning GCC : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509""

This reverts commit 2f55f0962e.
2017-01-13 09:42:12 +01:00
artemp
0a7e8bb429 fix GCC shadows a member warning [-Wshadow] 2017-01-12 17:48:56 +01:00
artemp
2f55f0962e It doesn't work with GCC reverting back "disable [-Wunused-result] warning GCC : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509"
This reverts commit 3c76e8d7ef.
2017-01-12 11:39:57 +01:00
artemp
3c76e8d7ef disable [-Wunused-result] warning GCC : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 2017-01-12 11:23:46 +01:00
artemp
7db3beda01 add parentheses to supress gcc warning [-Wparentheses] 2017-01-12 10:55:33 +01:00
artemp
de2b44712a move transform related headers into transform dir to minimize clutter 2017-01-11 11:10:03 +01:00
artemp
91f9508654 relax expression_grammar: allow _ underscore characters in global attribute names 2017-01-11 10:38:11 +01:00
artemp
f207ec2da2 cleanup 2017-01-10 17:19:28 +01:00
artemp
65dcb1c935 fix transform grammar to support whitespace/comma argument separation rules (https://github.com/mapnik/mapnik/pull/1416) ref #3569 2017-01-10 17:13:45 +01:00
artemp
7326c0d558 expressions - simplify attribute parsing by combining feature attribute and geometry_type attribute processing. 2017-01-10 11:54:08 +01:00
Artem Pavlenko
e5a93bce52 Merge pull request #3596 from mapycz/text-simple-placement-center
Text simple placement: add center 'C' placement
2017-01-09 11:57:03 +01:00
artemp
6190784350 remove remaining usage of deprecated dymamic exceptions: dtors are implicitely noexcept + qualify what methods with noexcept 2017-01-09 11:47:52 +01:00
Jiri Drbalek
4eae86b7bc text simple placement: add center 'C' placement 2017-01-08 09:05:44 +00:00
artemp
07ab49830f disable is_substitute instantiation for BOOST_VERSION > 106300, fixes gcc6+boost-1_63 build 2017-01-04 18:39:42 +01:00
artemp
e210dfaf8c fix GCC warning by adding missing parentheses around comparison in operand of '|' 2017-01-04 18:23:31 +01:00
Mickey Rose
962bcf84c5 change render_thunk_list to std::list<render_thunk>
Wrapping render_thunk in std::unique_ptr is one extra allocation per
element, with no purpose. The somewhat costly xyz_render_thunk move
constructor is only called once upon insertion, regardless of whether
we're emplacing render_thunk or unique_ptr.
2017-01-03 20:53:55 +01:00
artemp
d3a9e4c4d7 revive support for an empty array => geometry_empty
RFC 7946 "...GeoJSON processors MAY interpret Geometry objects with
          empty "coordinates" arrays as null objects."
2017-01-03 16:17:46 +01:00
artemp
7a8e8014b7 Revert "add ```template <typename T>" - oops we don't need this in master!
This reverts commit b3c4aff2c7.
2017-01-03 11:28:40 +01:00
artemp
b3c4aff2c7 add ```template <typename T>
transform_node(boost::value_initialized<T> const&)
          : base_() {}
``` to address

```c:\mb\windows-builds-64\packages\mapnik-windows\include\mapnik/transform_expression.hpp(175):
error C2664: 'mapbox::util::variant<mapnik::identity_node,mapnik::matrix_node,mapnik::translate_node,mapnik::scale_node,mapnik::rotate_node,mapnik::skewX_node,mapnik::skewY_node>::variant(mapbox::util::variant<mapnik::identity_node,mapnik::matrix_node,mapnik::translate_node,mapnik::scale_node,mapnik::rotate_node,mapnik::skewX_node,mapnik::skewY_node> &&) noexcept(false)':
cannot convert argument 1 from 'const boost::value_initialized<T>' to 'mapbox::util::no_init' [c:\mb\windows-builds-64\packages\mapnik-windows\mapnik-gyp\build\mapnik.vcxproj]
```
when building with VS2017 RC
2017-01-03 11:24:32 +01:00
lightmare
e41f41b0a6 Merge pull request #3566 from mapycz/better-largest-bbox
Better largest bbox
2017-01-02 03:25:14 +01:00
lightmare
a40ce9eefd Merge pull request #3578 from mapnik/cxx11-friendly
C++14-like type traits aliases
2017-01-02 03:24:59 +01:00
artemp
ed648ced46 SVG transform - implement in terms of boost::spirit::x3 2016-12-23 16:32:05 +01:00
artemp
3b52ae97c0 add missing header 2016-12-23 14:42:18 +01:00
artemp
95cc560167 SVG points - implement using boost::spirit::x3 + refactor parse_rule instantiations into separate *.cpp 2016-12-23 14:40:59 +01:00
artemp
584fda88e0 SVG path grammar - return start rule by const& 2016-12-23 13:26:37 +01:00
artemp
30749031cf SVG path parser - boost::spirit::x3 based implementation 2016-12-22 14:57:26 +01:00
artemp
9d0096eff6 remove unused include directive 2016-12-21 15:20:52 +01:00
artemp
506390b735 use curly braces initialiser (c++ style) 2016-12-21 09:05:31 +01:00
artemp
5745bedbd9 update copyright year to 2016 2016-12-20 17:57:22 +01:00
artemp
7f4fd0cc76 include guards - add missing and normalise namings 2016-12-20 17:45:38 +01:00
artemp
b73901edab remove from forthcoming 3.1.x release 2016-12-20 17:45:00 +01:00
artemp
f3cd36f0cd reserve std::vector capacity prior oppending + remove const qualifier 2016-12-20 10:40:50 +01:00
artemp
8b049230b3 topojson_grammar_x3 : make rules const 2016-12-20 10:31:52 +01:00
artemp
f1ccc66162 avoid parsing synthesised std::tuple<> + more fine-grained rules 2016-12-19 17:53:58 +01:00
artemp
18f721fd17 TopoJSON - implement parsing using spirit::x3 2016-12-19 16:18:19 +01:00
artemp
053eca1232 JSON - add geometry_grammar_x3 2016-12-16 11:21:20 +01:00
Mickey Rose
e6ed16e94e make mapnik_value_type_t C++11-friendly 2016-12-15 11:58:50 +01:00
Mickey Rose
568507349b bring C++14 type traits aliases for C++11 support 2016-12-15 11:51:02 +01:00
artemp
7affd45511 refactor json_value into separate header and reduce include bloat 2016-12-15 11:29:29 +01:00
artemp
4ba87b1e9d c++14 support is not sufficient on windows: reverting back and start tracking Windows workarounds in separate branch
Revert "move BOOST_SPIRIT_DEFINE into separate headers + use across all grammar defs (#3573)"

This reverts commit 81cfa721db.

Revert "windows : fix errors C3259 + C3249"

This reverts commit 8327905aba.

Revert "Workaround for VC++ C2995 via redifining BOOST_SPIRIT_DEFINE macro (#3573)"

This reverts commit 2a2f0bf00a.
2016-12-14 17:11:59 +01:00
artemp
81cfa721db move BOOST_SPIRIT_DEFINE into separate headers + use across all grammar defs (#3573) 2016-12-14 16:35:24 +01:00
artemp
8327905aba windows : fix errors C3259 + C3249 2016-12-14 15:53:07 +01:00
artemp
2a2f0bf00a Workaround for VC++ C2995 via redifining BOOST_SPIRIT_DEFINE macro (#3573) 2016-12-14 15:10:22 +01:00
Mickey Rose
7c14964de3 simplify mapnik::value conversion rules
- fixes #3570

- avoids recursive exception-specification on value constructor
  by only constructing a temporary for arithmetic types (everything
  else passes a reference to the base variant constructor)

- also removes `is_same<decay_t<T>, value>` SFINAE check -- because
  we're only passing a reference down, explicitly forcing the compiler
  to use the implicitly-defined copy/move instead is pointless
2016-12-14 02:37:27 +01:00
artemp
c2a61161a6 remove hash_combine (unused) 2016-12-13 15:51:57 +01:00
artemp
0307499753 simplify hash calculation (we don't need combine with which(), using hash<T> is sufficient) 2016-12-13 15:50:00 +01:00
artemp
8e15353818 minor format tweak 2016-12-13 15:49:03 +01:00
artemp
2924d736a8 update version to 3.1.0 2016-12-09 17:07:23 +01:00
artemp
0d703ee552 cleanup include directives 2016-12-08 18:55:55 +01:00
artemp
fe7e9a7dc5 use mapbox namespace to fix name resolution 2016-12-06 15:14:28 +01:00
artemp
df10fab439 only add valid bounding boxes (make backward compatible) 2016-12-06 12:23:09 +01:00
Jiri Drbalek
2174c10b2f find max element instead of std::sort 2016-12-03 14:33:55 +00:00
Dane Springmeyer
8262eb5206 avoid -Wshadow and 'unrecognized command line option' with gcc 2016-12-02 13:43:43 -08:00
artemp
5ea5f18a7e cleanups 2016-12-02 12:42:07 +01:00
artemp
6824f4c477 fix more gcc warnings 2016-12-02 11:42:57 +01:00
artemp
069de8e266 fix gcc6 compilation issue 2016-12-02 11:04:11 +01:00
artemp
2f8da6dfd5 reduce compiler warnings (gcc 6) 2016-12-01 17:17:56 +01:00
artemp
b01481ded7 refactor feature_grammar_x3 to have a cleaner separation between feature and geometry rules 2016-11-30 11:33:35 +01:00
artemp
2dc57effb8 allow null geometry 2016-11-29 16:26:58 +01:00
Jiri Drbalek
2b852ad1f9 remove methods that are not referenced anywhere 2016-11-29 14:55:06 +00:00
artemp
36eb7f61bd implement from_geojson in terms of parse_(feature|geometry) 2016-11-29 10:48:06 +01:00
artemp
941a025682 remove spirit::qi usage from (Geo)JSON 2016-11-29 10:46:23 +01:00
artemp
160c1c9471 pass iterator pair by ref,const& ref to match spirit::x3 APIs and be able check for fully consumed input (needed by geojson.input logic) 2016-11-28 18:40:03 +01:00
artemp
f4f39993d0 allow accessing geometry by ref 2016-11-28 18:38:40 +01:00
artemp
cc9f23c470 allow empty "properties" 2016-11-28 18:38:04 +01:00
artemp
b05d0caba1 implement support for "GeometryCollection" type 2016-11-28 17:05:46 +01:00
artemp
0ea1c7cce2 Merge branch 'master' into develop-master 2016-11-28 15:26:13 +01:00
artemp
af1b39c689 support both box2d<float> and box2d<double> 2016-11-28 10:14:49 +01:00
artemp
d4e1cb9ae7 add an extra extract_bounding_boxes_reverse_context_type definition 2016-11-27 17:06:02 +01:00
artemp
f32b423428 attempting to keep clang on Travis happy 2016-11-25 17:59:44 +01:00
artemp
483f709541 don't include xxx_def.hpp + make rules const 2016-11-25 16:52:56 +01:00
artemp
8a436c8cdc add extract_bounding_boxes_x3 parser configuration 2016-11-25 16:49:42 +01:00
artemp
be4f9ca79b add missing context type definitions + BOOST_SPIRIT_INSTANTIATE_UNUSED macro to instantiate parse_rule with boost::spirit::x3::unused_type attribute 2016-11-25 16:46:10 +01:00
artemp
163a82fd1e add feature_grammar_x3 implementation 2016-11-25 16:45:23 +01:00
artemp
cad029bf7c make hex rules const 2016-11-25 16:44:20 +01:00
talaj
994a327c7f remove superfluous declaration 2016-11-25 13:31:55 +01:00
artemp
23ba18ead2 make rules const 2016-11-25 11:48:16 +01:00