Commit graph

77 commits

Author SHA1 Message Date
Artem Pavlenko
02e3b1577c Use __APPLE__ to check OS platform 2024-03-07 09:09:56 +00:00
Artem Pavlenko
edddd08d73 Merge branch 'master' into svg-group-render 2023-01-18 09:48:29 +00:00
Artem Pavlenko
7c24ff09ee clang-format 2022-11-25 13:54:41 +00:00
Artem Pavlenko
c3aec439a7 svg2png - check for valid opacity range 0..1 [WIP] [skip ci] 2022-11-24 10:25:09 +00:00
Artem Pavlenko
bfdab8879c svg2png - add top level "opacity" option e.g similar to <svg opacity="<val>"/> [WIP] [skip ci] 2022-11-23 16:18:18 +00:00
Mathis Logemann
7d267b47fe Merge branch 'master' of https://github.com/mapnik/mapnik into feature/cmake-static 2022-11-22 20:14:33 +01:00
Artem Pavlenko
d4ae5ac653 SVG group renderer implementation (WIP) [skip ci] 2022-11-18 15:17:58 +00:00
Artem Pavlenko
a65d65a5ab Update .clang-format to BraceWrapping: BeforeCatch : true
run `pre-commit`
2022-11-10 15:57:38 +00:00
Mathis Logemann
42f465f842 refactor datasource plugins
fix merge

remove old DATASOURCE_PLUGIN call

fix memory_datasource

wip

wip

fix temp return

fix install

wip before_unload

linux

remove docker

remove docker

comments

add windows error message if libmapnik=static and plugins=dynamic

fix false plugin macro

plugin default de/constructor to remove UB

simplyfy plugin targets - add fpic

fix makro

simplyfy

use unique_ptr for plugin handle

rename option static plugins

replace local init with fnc call

call setup everywhere

init datasource_static
2022-02-07 15:35:09 +01:00
Mathis Logemann
d5a873e81c format utils 2022-01-27 00:12:12 +01:00
Artem Pavlenko
fd204874ec svg2png - avoid writing to an empty image 2021-04-15 15:53:04 +01:00
Artem Pavlenko
4f783f61ed Init by value 2021-04-12 14:16:09 +01:00
Artem Pavlenko
bd961c4da2 update copyright year [skip ci] 2021-01-05 14:39:07 +00:00
Mathis Logemann
64054fade4 compiler independent warning ignore
Signed-off-by: Mathis Logemann <mathisloge@gmail.com>
2020-11-19 17:25:10 +01:00
Artem Pavlenko
0d693b151d svg2png: use svgBBOX() to calculate output PNG dimensions when no valif width or height (or viewBox) is specified. 2020-02-05 15:06:11 +00:00
Artem Pavlenko
ed194a3c09 use std::round (ref:https://en.cppreference.com/w/cpp/numeric/math/round) 2020-01-23 15:48:16 +00:00
Artem Pavlenko
b6e9711add Mark output image as premultiplied alpha 2020-01-22 10:49:10 +00:00
Artem Pavlenko
97e33ec8ca Move 0.5 up/down rounding into rounding expression (via @lightmare 7f54e94748 (r369294323)) (ref #4116) 2020-01-22 10:45:15 +00:00
Artem Pavlenko
4276f01404 Init output image with transparent color and 255 alpha. 2020-01-21 15:12:18 +00:00
Artem Pavlenko
7f54e94748 Add support for scale-factor parameter - useful for debugging SVG issues (ref #4112) 2020-01-21 10:33:04 +00:00
Artem Pavlenko
c29f944726 Merge branch 'fix-group-symbolizer-crash' of https://github.com/lightmare/mapnik into lightmare-fix-group-symbolizer-crash 2018-01-05 12:16:41 +00:00
artemp
017d6cb540 cleanup 2017-06-29 09:41:16 +02:00
artemp
a6bc69359a use SVG viewport as bounding box 2017-06-29 09:41:16 +02:00
artemp
0301399d40 svg2png - add short program options. 2017-06-29 09:41:16 +02:00
artemp
3f591af871 initial support for strict SVG parsing (WIP) 2017-06-29 09:41:16 +02:00
artemp
333ef9fde1 update copyright year 2017-05-05 13:02:01 +02:00
Mickey Rose
fc3d194ad2 missed svg2png when renaming svg_renderer_agg 2016-06-16 23:16:39 +02:00
Dane Springmeyer
57dbd77819 more warning_ignore usage - refs #2907 2016-03-09 16:43:00 -08:00
artemp
d027ed67c7 more const strictness, update to work with latest mapbox::variant/visitor-no-copy branch 2016-01-27 14:50:17 +01:00
artemp
c8932b3df3 svg2png : use SVG dimensions as a fallback when bounding box has zero width or height (e.g horizontal or vertical line) 2016-01-08 10:20:50 +00:00
Dane Springmeyer
7608040906 centralize warning suppression 2015-11-07 17:53:09 -08:00
Dane Springmeyer
c8867d1419 use std::system 2015-10-19 10:01:33 -07:00
artemp
f8fd60dc69 remove libxml includes and init calls 2015-07-30 13:13:53 +02:00
artemp
5b287ab798 catch std::exception to get better stderr 2015-07-29 16:09:33 +02:00
artemp
52007b8019 Merge branch 'master' into svg-parser-errors 2015-07-21 09:46:38 +02:00
artemp
f58a13825f correct std::clog message 2015-07-20 14:51:24 +02:00
artemp
faa2c19359 make visitor return status + don't mutating svg_name_ 2015-07-20 12:05:26 +02:00
artemp
c166d9acb8 reduce code duplication 2015-07-16 13:06:52 +02:00
artemp
8c6bf0eef6 update copyright notice 2015-06-16 12:49:16 +02:00
Blake Thompson
0eecbd3e0f Modified marker cache to store shared_ptrs in order to prevent threading issues and to close #2713 2015-05-04 14:11:41 -05:00
artemp
470da20d53 fix remanining cAmEl case names 2015-05-04 12:49:11 +02:00
artemp
081cf02dcf fix method signitures to use std::size_t
rename getSize() -> size(), getRowSize() -> row_size
2015-05-04 10:57:57 +02:00
Blake Thompson
2ebce8e7e1 Updated svg2png for new markers 2015-02-19 12:19:01 -06:00
Blake Thompson
bc28c12572 Found more situations where getRowSize should be used over multiplying the width by the pixel size. 2015-01-27 15:29:43 -06:00
Blake Thompson
22a384ef33 Moved image_data_rgba8 to image_rgba8. Ref #2633 2015-01-21 20:31:02 -06:00
Blake Thompson
93f835177b Removed all the code for the previous type of image and image_32. Ref #2633 2015-01-21 17:57:16 -06:00
Blake Thompson
badb0c9a97 This is a complete removal of code that utilizes image_32 in the library. It is a sweeping change that does some of the following:
* Changes all agg_renderers to use a image_data_any variant (only image_data_rgba8 is implemented currently)
* Changes the marker and marker_cache to use image_data_any images
* Changes the symbolizers so that they must be aware of the source data type they are attempting to render and the render type that is expected to be rendered into.
* Moves many utilities into image_utils, that were previously in image_32.

The kicker is that this still isn't working perfectly yet, but I am commiting so I don't have tears in case everything is lost on my computer.

Ref #2633
2015-01-20 18:30:10 -06:00
Dane Springmeyer
1f25bae0f4 fix compile of svg2png 2015-01-14 21:03:35 -08:00
artemp
38da080f82 make concrete image_data type names more expressive and explicit about color channels/depth:
image_data_32 -> image_data_rgba8
image_data_8  -> image_data_gray8
image_data_16 -> image_data_gray16
image_data_float32  -> image_data_gray32f

NOTE: currently image_data_gray16::pixel_type = std::int16_t (signed 16 bit int) to match GDAL
should we support unsigned types?
2014-12-04 11:02:42 +01:00
artemp
333965b588 update copyright year 2014-11-20 15:25:50 +01:00