Python bindings for Stroke don't have access to dash array #317

artemp opened this Issue Oct 11, 2011 · 3 comments


None yet
1 participant

artemp commented Oct 11, 2011



import mapnik

s = mapnik.Stroke()
s.add_dash(0.5, 0.5)

I propose a 'dashes' property for the Stroke object so that the user can see dashes that have been added (or remove them).

From the LineSymbolizer page:

"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported as well (e.g. to start the line not with a stroke, but with a gap)."


artemp commented Oct 11, 2011

[mishok13] This patch implements get_dash method for Stroke objects, which is not exactly requested, but Dane didn't see any point in having read-only property.


artemp commented Oct 11, 2011

[springmeyer] Awesome, thanks! I actually think a property would be good for this, but we can worry about adding that at a later stage. Various places in the python bindings will need a bit more wrapping to allow get/set with list attributes, so this approach is great for now.

applied with tests (and adding you to the AUTHORS list) in r1151


artemp commented Oct 11, 2011

[springmeyer] changing milestone... going to be part of 0.6.1 release

@artemp artemp closed this Oct 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment