diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
commit | c2175edc7aa44ca0b526f008d473d6f8a8ac4933 (patch) | |
tree | d6c491676b413ad1922481f8c3fc7b64c3afc0a5 /Build/source/utils/asymptote/drawpath.cc | |
parent | 5d08e9ff4fe5fc836d237ea08e82c82b27d558a2 (diff) |
asy 1.98
git-svn-id: svn://tug.org/texlive/trunk@18982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawpath.cc')
-rw-r--r-- | Build/source/utils/asymptote/drawpath.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/drawpath.cc b/Build/source/utils/asymptote/drawpath.cc index 9332ead8939..14dd7692812 100644 --- a/Build/source/utils/asymptote/drawpath.cc +++ b/Build/source/utils/asymptote/drawpath.cc @@ -43,6 +43,12 @@ double PatternLength(double arclength, const array& pat, ncycle*sum+terminator : 0.0; } +bool isdashed(pen& p) { + const LineType *linetype=p.linetype(); + size_t n=linetype->pattern.size(); + return n > 0; +} + pen adjustdash(pen& p, double arclength, bool cyclic) { pen q=p; @@ -127,7 +133,8 @@ bool drawPath::draw(psfile *out) if (n == 0 || pentype.invisible()) return true; - pen q=adjustdash(pentype,p.arclength(),p.cyclic()); + pen q = isdashed(pentype) ? adjustdash(pentype,p.arclength(),p.cyclic()) : + pentype; penSave(out); penTranslate(out); |