summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runlabel.in
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-03 22:35:04 +0000
committerKarl Berry <karl@freefriends.org>2018-04-03 22:35:04 +0000
commit36b8d1341af4a7ab1f5759d75ad1eecfc375c1f4 (patch)
tree12d09b686d2c18f245dc6fd492c09cdcd4c02ebc /Build/source/utils/asymptote/runlabel.in
parentd73e029b665b866fe734e44508746a2cba513fd7 (diff)
asy 2.42 sources
git-svn-id: svn://tug.org/texlive/trunk@47274 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/runlabel.in')
-rw-r--r--Build/source/utils/asymptote/runlabel.in39
1 files changed, 15 insertions, 24 deletions
diff --git a/Build/source/utils/asymptote/runlabel.in b/Build/source/utils/asymptote/runlabel.in
index f1ddab9f2d3..9503a0b0ee8 100644
--- a/Build/source/utils/asymptote/runlabel.in
+++ b/Build/source/utils/asymptote/runlabel.in
@@ -136,7 +136,6 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
mem::vector<solvedKnot> nodes;
solvedKnot node;
- bool cyclic=false;
bool active=false;
array *P=new array(0);
@@ -150,28 +149,6 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
switch(c) {
case 'M':
{
- if(active) {
- if(cyclic) {
- if(node.point == nodes[0].point)
- nodes[0].pre=node.pre;
- else {
- pair delta=(nodes[0].point-node.point)*third;
- node.post=node.point+delta;
- nodes[0].pre=nodes[0].point-delta;
- node.straight=true;
- nodes.push_back(node);
- }
- } else {
- node.post=node.point;
- node.straight=false;
- nodes.push_back(node);
- }
- if(cyclic) // Discard noncyclic paths.
- P->push(path(nodes,nodes.size(),cyclic));
- nodes.clear();
- }
- active=false;
- cyclic=false;
node.pre=node.point=readpair(buf,hscale,vscale);
node.straight=false;
break;
@@ -202,7 +179,21 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
}
case 'c':
{
- cyclic=true;
+ if(active) {
+ if(node.point == nodes[0].point)
+ nodes[0].pre=node.pre;
+ else {
+ pair delta=(nodes[0].point-node.point)*third;
+ node.post=node.point+delta;
+ nodes[0].pre=nodes[0].point-delta;
+ node.straight=true;
+ nodes.push_back(node);
+ }
+ P->push(path(nodes,nodes.size(),true)); // Discard noncyclic paths
+ nodes.clear();
+ }
+ active=false;
+ node.straight=false;
break;
}
}