Commit 98ff4b4
committed
Support odd-length dash patterns in Agg.
All vector backends already support passing an odd-length dash pattern,
duplicating the on/off array (so that on the second repetition "on"
becomes "off" and vice-versa). This is also explicitly supported by
the svg spec for `stroke-dasharray` ("If an odd number of values is
provided, then the list of values is repeated to yield an even number of
values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2.") and less explicitly
by the pdf and ps specs, and by cairo. So the backend needing support
is Agg; iterating twice over the sequence is likely simplest.1 parent 5698325 commit 98ff4b4
2 files changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
| |||
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
264 | 262 | | |
265 | | - | |
| 263 | + | |
266 | 264 | | |
267 | 265 | | |
268 | 266 | | |
269 | 267 | | |
270 | | - | |
| 268 | + | |
271 | 269 | | |
272 | 270 | | |
273 | 271 | | |
| |||
280 | 278 | | |
281 | 279 | | |
282 | 280 | | |
283 | | - | |
| 281 | + | |
284 | 282 | | |
285 | 283 | | |
286 | 284 | | |
| |||
0 commit comments