mapbox / spritezero

small opinionated sprites
Other
173 stars 63 forks source link

Does not recognize stroke-dasharray #18

Closed brentlemons closed 4 years ago

brentlemons commented 8 years ago

Stroke-dasharray is ignored. Renders as solid line. Tried with both and .

tmcw commented 8 years ago

This would be upstream in Mapnik - @springmeyer @jakepruitt any idea about support/potential of support for dasharray?

springmeyer commented 8 years ago

Checked in Mapnik and yes, support for drawing dashed lines is missing from the structure used to pass around drawing commands and from the SVG rasterization code. Adding this should be feasible, probably a day or two of work. Proposed next actions:

artemp commented 8 years ago

moved to https://github.com/mapnik/mapnik/issues/3224

springmeyer commented 8 years ago

@artemp please provide some context on why you are asking?

artemp commented 8 years ago

Should we change to ? /cc @springmeyer @jakepruitt

diff --git a/include/mapnik/marker.hpp b/include/mapnik/marker.hpp
index 3aaa1cd..d8e1b12 100644
--- a/include/mapnik/marker.hpp
+++ b/include/mapnik/marker.hpp
@@ -115,11 +115,11 @@ public:

     inline double width() const
     {
-        return vector_data_->bounding_box().width();
+        return vector_data_->width();
     }
     inline double height() const
     {
-        return vector_data_->bounding_box().height();
+        return vector_data_->height();
     }

     mapnik::svg_path_ptr get_data() const
artemp commented 8 years ago

^ wrong repo, moved to https://github.com/mapnik/mapnik/issues/3224

springmeyer commented 4 years ago

spritezero has supported stroke-dasharray for some time now after upgrading to mapnik after this fix: https://github.com/mapnik/mapnik/issues/3223