Commit graph

491 commits

Author SHA1 Message Date
artemp
fe215a684e c++11 style : replace (almost) all typedef with type alias's 2014-07-07 18:23:15 +01:00
artemp
aa9966ed88 parse comp-op property as enumeration_wrapper or expression_str 2014-06-27 13:58:03 +01:00
artemp
68a5cc55a6 image_filters : agg-stack-blur requires premultiplied pixels - move de/pre multipling into apply_filter() 2014-06-19 15:40:54 +01:00
artemp
2fb3069825 image-filters: apply image-filters in demultiplied colour space 2014-06-19 13:26:40 +01:00
artemp
c605ce81aa pedantic : prefer explicit double values in comparisons 2014-06-19 12:14:12 +01:00
artemp
2c3173c1aa support halo-comp-op property (#2267) 2014-06-17 15:11:34 +01:00
artemp
3ded23fbab move make_unique out of std namespace and allow building with c++14 compilers
( -std=c++1y )
2014-06-12 15:14:05 +01:00
artemp
5e386f5c97 capture built-in types by value 2014-06-06 13:12:55 +01:00
artemp
a49e1d075e initial refactor pass (fixes #2235) 2014-06-04 18:05:27 +01:00
Dane Springmeyer
aaae8b1cba optimize raster rendering when not resizing 2014-05-15 23:38:47 -07:00
Dane Springmeyer
2f8451b99a variables support for cairo/grid/svg 2014-05-13 18:24:17 -07:00
Dane Springmeyer
2c661ed3d5 support for render time variables 2014-05-11 13:08:24 -07:00
Dane Springmeyer
9e9747ffad Merge branch 'master' of github.com:mapnik/mapnik into expr-v2
Conflicts:
	src/agg/process_building_symbolizer.cpp
	src/cairo_context.cpp
	src/cairo_renderer.cpp
	src/grid/process_building_symbolizer.cpp
	src/grid/process_line_pattern_symbolizer.cpp
	src/grid/process_text_symbolizer.cpp
	tests/python_tests/images/support/marker-text-line-scale-factor-0.899.png
	tests/python_tests/images/support/marker-text-line-scale-factor-1.5.png
	tests/python_tests/images/support/marker-text-line-scale-factor-1.png
	tests/python_tests/images/support/marker-text-line-scale-factor-10.png
	tests/python_tests/images/support/marker-text-line-scale-factor-100.png
	tests/python_tests/images/support/marker-text-line-scale-factor-2.png
	tests/python_tests/images/support/marker-text-line-scale-factor-5.png
	tests/visual_tests/images/lines-5-200-200-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-200-200-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-400-400-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-600-600-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-800-800-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-800-800-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-200-200-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-800-800-2.0-agg-reference.png
	tests/visual_tests/test.py
2014-04-24 21:44:28 -07:00
Dane Springmeyer
39737c5f1d Merge branch '2.3.x' of github.com:mapnik/mapnik
Conflicts:
	.travis.yml
	CHANGELOG.md
	bindings/python/build.py
	include/mapnik/feature_style_processor_context.hpp
	include/mapnik/feature_style_processor_impl.hpp
	include/mapnik/json/feature_collection_grammar.hpp
	include/mapnik/json/feature_collection_parser.hpp
	include/mapnik/json/feature_generator_grammar.hpp
	include/mapnik/json/feature_parser.hpp
	include/mapnik/json/geojson_generator.hpp
	include/mapnik/json/geometry_generator_grammar.hpp
	include/mapnik/json/geometry_parser.hpp
	plugins/input/gdal/gdal_featureset.cpp
	plugins/input/geojson/geojson_datasource.cpp
	plugins/input/occi/occi_featureset.cpp
	plugins/input/osm/osm_featureset.cpp
	plugins/input/postgis/build.py
	plugins/input/postgis/connection.hpp
	src/agg/agg_renderer.cpp
	src/build.py
	src/cairo_context.cpp
	src/datasource_cache.cpp
	src/grid/process_line_symbolizer.cpp
	src/grid/process_polygon_pattern_symbolizer.cpp
	src/grid/process_polygon_symbolizer.cpp
	src/grid/process_text_symbolizer.cpp
	src/json/feature_grammar.cpp
	tests/cpp_tests/fontset_runtime_test.cpp
	tests/visual_tests/images/collision-600-400-1.0-agg-reference.png
	tests/visual_tests/images/image-filters-multi-blur-512-512-1.0-agg-reference.png
	tests/visual_tests/images/image-filters-multi-blur-512-512-2.0-agg-reference.png
	tests/visual_tests/images/image-filters-multi-blur-inflate-512-512-1.0-agg-reference.png
	tests/visual_tests/images/image-filters-multi-blur-inflate-512-512-2.0-agg-reference.png
	tests/visual_tests/images/lines-1-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-1-600-600-1.0-agg-reference.png
	tests/visual_tests/images/lines-1-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-2-200-200-1.0-agg-reference.png
	tests/visual_tests/images/lines-2-400-400-1.0-cairo-reference.png
	tests/visual_tests/images/lines-2-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-2-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-2-800-800-2.0-agg-reference.png
	tests/visual_tests/images/lines-3-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-3-600-600-1.0-agg-reference.png
	tests/visual_tests/images/lines-3-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-200-200-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-200-200-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-400-400-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-400-400-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-600-600-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-5-800-800-1.0-agg-reference.png
	tests/visual_tests/images/lines-5-800-800-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-200-200-1.0-agg-reference.png
	tests/visual_tests/images/lines-6-200-200-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-400-400-1.0-agg-reference.png
	tests/visual_tests/images/lines-6-600-600-1.0-agg-reference.png
	tests/visual_tests/images/lines-6-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-6-800-800-1.0-agg-reference.png
	tests/visual_tests/images/lines-6-800-800-2.0-agg-reference.png
	tests/visual_tests/images/lines-shield-600-600-2.0-agg-reference.png
	tests/visual_tests/images/lines-shield-600-600-2.0-cairo-reference.png
	tests/visual_tests/images/shield-on-polygon-600-400-1.0-agg-reference.png
	tests/visual_tests/images/shield-on-polygon-600-400-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-490-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-495-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-495-100-2.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-497-100-1.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-497-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-497-100-2.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-498-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-499-100-1.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-499-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-499-100-2.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-500-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-501-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-502-100-1.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-502-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-505-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-505-100-2.0-cairo-reference.png
	tests/visual_tests/images/shieldsymbolizer-1-510-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-490-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-495-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-497-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-498-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-499-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-500-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-501-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-502-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-505-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-3-510-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-490-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-495-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-497-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-498-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-499-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-500-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-501-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-502-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-505-100-2.0-agg-reference.png
	tests/visual_tests/images/shieldsymbolizer-4-510-100-2.0-agg-reference.png
	tests/visual_tests/test.py
2014-04-24 14:50:55 -07:00
Dane Springmeyer
103e874f25 fix #2202 2014-04-03 17:15:57 -07:00
Dane Springmeyer
e94876ebe4 Merge pull request #2160 from MapQuest/expr-v2-group-symbolizer
Group Symbolizer
2014-04-03 11:52:21 -07:00
Dane Springmeyer
cb3db66b82 std::make_unique 2014-03-10 21:34:48 -07:00
Dane Springmeyer
7d5e0f1f91 one step closer to expression support for line cap/join 2014-03-10 13:00:47 -07:00
Dane Springmeyer
24aaa0a6de post merge cleanups 2014-03-10 10:47:43 -07:00
Dane Springmeyer
6433d9482e Merge branch 'master' of github.com:mapnik/mapnik into expr-v2
Conflicts:
	include/mapnik/symbolizer.hpp
	src/agg/agg_renderer.cpp
	src/agg/process_line_pattern_symbolizer.cpp
	src/agg/process_line_symbolizer.cpp
	src/agg/process_polygon_pattern_symbolizer.cpp
	src/agg/process_polygon_symbolizer.cpp
	src/cairo_renderer.cpp
	src/feature_type_style.cpp
	src/grid/process_line_pattern_symbolizer.cpp
	src/grid/process_line_symbolizer.cpp
	src/grid/process_markers_symbolizer.cpp
	src/grid/process_polygon_pattern_symbolizer.cpp
	src/grid/process_polygon_symbolizer.cpp
2014-03-10 00:05:56 -07:00
Dane Springmeyer
3dd05bd171 support scale_factor in geometry-transform translate and scale - refs #1926 2014-02-27 13:28:03 -08:00
Dane Springmeyer
e49f63730e support scale_factor in geometry-transform translate and scale - refs #1926 2014-02-27 11:55:58 -08:00
Dane Springmeyer
fead2e2584 fixes after merge 2014-02-27 11:17:50 -08:00
Dane Springmeyer
277ae93d2c make inflated image for blurring opt-in via 'image-filters-inflate' option - refs #2165
Conflicts:
	src/agg/agg_renderer.cpp
2014-02-27 11:17:09 -08:00
Dane Springmeyer
4e957c9cac make inflated image for blurring opt-in via 'image-filters-inflate' option - refs #2165 2014-02-27 10:11:17 -08:00
Jordan Hollinger
08ea56996a Add shield symbolizer support in group symbolizer processing.
Update some test cases to use ShieldSymbolizer instead of point and text.
2014-02-25 08:53:35 -05:00
Jordan Hollinger
07dc6e37a2 Merge branch 'expr-v2' of github.com:mapnik/mapnik into expr-v2-group-symbolizer
Conflicts:
	include/mapnik/attribute_collector.hpp
2014-02-18 18:22:01 -05:00
Jordan Hollinger
3d1c30db1e Extracted a lot of code from agg render process_group_symbolizer.
Move a lot of processing into a common process_group_symbolizer function.
Also, extract column collection out of process_group_symbolizer function.
This will reduce duplication needed for other renderers.
2014-02-18 15:06:40 -05:00
Matt Amos
efc29649ab Added test for group symbolizer, fixed segfault.
Segfault was due to `glyph_position` structs keeping a pointer to
`glyph_info` objects which went out of scope at a different time.
The (rather ugly) fix for the moment is to copy that information
into the thunk object.
2014-02-18 14:06:05 -05:00
Jordan Hollinger
76329028d2 Find placements and render in process_group_symbolizer.
Create a group_symbolizer_helper for group placments, and extract some code from
text_symbolizer_helper into a base class to share with group_symbolizer_helper.
Also, move tolerance_iterator into its own header file. Use helper in
process_group_symbolizer to find placement positions.
2014-02-18 14:01:04 -05:00
Matt Amos
1ccdc5b76d Added code to render frozen thunks.
This renders the saved information from previous calls to the
bounding box extraction code, offset by some amount which should
be determined from running the `placement_finder`. Note that this
doesn't implement that bit, just the rendering.
2014-02-18 11:11:07 -05:00
Matt Amos
b85e7d0764 Added method to extract bounding boxes for symbolizers.
This is done by creating a fake 'virtual' environment at a fake
point and running the symbolizer render code. The actual render
is saved in a thunk for after the group layout has been done.
2014-02-18 11:11:06 -05:00
Jordan Hollinger
fbc2a0d1e3 Framework for group symbolizer.
This includes XML parsing of group symbolizer and related objects and
process_group_symbolizer method in the AGG renderer. This also includes
code to collect group symbolizer indexed columns, create sub features,
and match them to group rules.
2014-02-18 11:07:52 -05:00
Dane Springmeyer
89f72f02e8 pass feature to vertex_converters - refs #2148/#2140 2014-02-08 22:10:14 -08:00
Dane Springmeyer
83bde5fef2 use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:44:33 -08:00
Dane Springmeyer
7bcbcb0c4f use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:44:04 -08:00
Dane Springmeyer
4731baab93 use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:43:34 -08:00
artemp
3628b5f237 halo-transform initial impl 2014-01-17 11:47:18 +00:00
Matt Amos
ceaea9a948 Factored out common implementation of polygon symbolizer. 2013-12-09 20:42:00 +00:00
Matt Amos
dd9584bdd6 Factored out markers symbolizer logic.
It's not ideal - there's still a bunch of "dispatch" objects from
which the common elements could be factored for greater
readability.
2013-12-09 18:50:00 +00:00
Matt Amos
f01953e8f7 Factored out common implementation of raster symbolizer. 2013-12-06 18:09:24 +00:00
Matt Amos
da5574d247 Factored out common implementation of point symbolizer. 2013-12-06 17:30:06 +00:00
Matt Amos
05982c4caf Factored out common code for building symbolizer.
There's a lot of code common between symbolizers which do things
like layout, setup, etc... So it seems sensible to extract the
common operations & loops into a single place which is
independent of the actual renderer.

I've started doing this with C++11 lambdas, although that might
not be the best implementation long term. Should be easy enough
to change, though.
2013-12-06 16:33:26 +00:00
Matt Amos
a76e441174 Factored out common renderer fields.
The idea here is that much of the code in the renderers and the
various `process_*` rendering methods is shared, but this sharing
is obfuscated by the lack of sharing of renderer fields and
methods.

This is the first step in trying to factor out commonalities in
order to simplify the implementation of the renderers and make
them easier to understand and modify.
2013-12-05 16:21:55 +00:00
Dane Springmeyer
e9ca9c8790 symbolizer-expressions replayed against latest master 2013-11-27 22:50:15 -08:00
Dane Springmeyer
64d5153aea Improved support for international text
- Implementation by @herm for GSOC 2012 (http://mapnik.org/news/2012/10/06/gsoc2012-status9/)
 - C++11 port, improvements, optimizations by @artemp
 - Testing and integration with master by @springmeyer
 - Thank you to all the support from @behdad along the way
 - Thanks for help testing @toton6868, @stephankn, @nirvn, @mfrasca, @simonsonc and many others

Refs: #2073,#2070,#2038,#2037,#1953,#1820,#1819,#1714,#1634,#1547,#1532,#1319,#1208,#1154,#1146
2013-11-22 00:06:32 -08:00
Dane Springmeyer
c7a6265869 organize text code in subdirectory 2013-11-07 20:09:22 -08:00
Dane Springmeyer
08fa9fd8ec Merge branch '2.3.x' of github.com:mapnik/mapnik
Conflicts:
	bindings/python/mapnik_building_symbolizer.cpp
	bindings/python/mapnik_debug_symbolizer.cpp
	bindings/python/mapnik_line_pattern_symbolizer.cpp
	bindings/python/mapnik_line_symbolizer.cpp
	bindings/python/mapnik_markers_symbolizer.cpp
	bindings/python/mapnik_point_symbolizer.cpp
	bindings/python/mapnik_polygon_symbolizer.cpp
	bindings/python/mapnik_python.cpp
	bindings/python/mapnik_raster_symbolizer.cpp
	bindings/python/mapnik_shield_symbolizer.cpp
	bindings/python/mapnik_symbolizer.cpp
2013-11-07 09:21:05 -08:00
Dane Springmeyer
0250538149 add support for geometry-transform in pattern symbolizers - closes #2065 2013-11-05 16:40:09 -08:00
artemp
3837c68762 use non-zero filling rule when rasterising lines 2013-10-29 12:26:33 +00:00