Skip to content

Commit 659c614

Browse files
committed
Merge pull request #12 from mdboom/enh_dashoffset
Enh dashoffset
2 parents 2bf1b21 + 8b6a519 commit 659c614

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,16 @@ def set_linecap(self, linecap, store=1):
276276
def set_linedash(self, offset, seq, store=1):
277277
if self.linedash is not None:
278278
oldo, oldseq = self.linedash
279-
if seq_allequal(seq, oldseq): return
279+
if seq_allequal(seq, oldseq) and oldo == offset:
280+
return
280281

281282
if seq is not None and len(seq):
282283
s="[%s] %d setdash\n"%(_nums_to_str(*seq), offset)
283284
self._pswriter.write(s)
284285
else:
285286
self._pswriter.write("[] 0 setdash\n")
286-
if store: self.linedash = (offset,seq)
287+
if store:
288+
self.linedash = (offset, seq)
287289

288290
def set_font(self, fontname, fontsize, store=1):
289291
if rcParams['ps.useafm']: return

src/_backend_agg_basic_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Dashes
6363
}
6464
stroke.add_dash(val0, val1);
6565
}
66+
stroke.dash_start(get_dash_offset() * dpi / 72.0);
6667
}
6768
};
6869

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy