From 3a9439b815af6c2d41c60f6694d88f2852544442 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 28 Feb 2019 18:48:48 +0000 Subject: asymptote 2.47 support files git-svn-id: svn://tug.org/texlive/trunk@50168 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/asymptote/plain_xasy.asy | 132 ----------------------------- 1 file changed, 132 deletions(-) delete mode 100644 Master/texmf-dist/asymptote/plain_xasy.asy (limited to 'Master/texmf-dist/asymptote/plain_xasy.asy') diff --git a/Master/texmf-dist/asymptote/plain_xasy.asy b/Master/texmf-dist/asymptote/plain_xasy.asy deleted file mode 100644 index efc739d8385..00000000000 --- a/Master/texmf-dist/asymptote/plain_xasy.asy +++ /dev/null @@ -1,132 +0,0 @@ -restricted bool inXasyMode=false; -bool diagnostics=false; -void report(string text) -{ - if(diagnostics) - write(text); -} -void report(transform t) -{ - if(diagnostics) - write(t); -} -void report(int i) -{ - if(diagnostics) - write(i); -} -void initXasyMode() -{ - size(0,0); - inXasyMode=true; -} - -void exitXasyMode() -{ - inXasyMode=false; -} -private picture[] tempStore; -private picture newPic; -void startScript() -{ - tempStore.push(currentpicture.copy()); - newPic=new picture; - currentpicture=newPic; -} - -void endScript() -{ - if(tempStore.length < 1) { - abort("endScript() without matching beginScript()"); - } else { - currentpicture=tempStore.pop(); - add(currentpicture,newPic.fit(),group=false); - } - shipped=false; -} - -struct indexedTransform { - int index; - transform t; - bool active; - void operator init(int index, transform t, bool active=true) { - this.index=index; - this.t=t; - this.active=active; - } -} - -struct framedTransformStack { - struct transact { - transform t; - bool active; - void operator init(transform t, bool active=true) { - this.t=t; - this.active=active; - } - void operator init(indexedTransform i){ - this.t=i.t; - this.active=i.active; - } - void operator init() { - this.t=identity(); - this.active=true; - } - } - private transact[] stack; - private int[] frames; - private int stackBase=0; - transform pop() { - if(stack.length == 0) - return identity(); - else { - transform popped=stack[0].t; - stack.delete(0); - report("Popped"); - report(popped); - return popped; - } - } - - transform pop0() { - if(stack.length == 0) - return identity(); - else { - static transform zerotransform=(0,0,0,0,0,0); - transform popped=stack[0].active ? stack[0].t : zerotransform; - stack.delete(0); - report("Popped"); - report(popped); - return popped; - } - } - - void push(transform t, bool Active=true) { - report("Pushed"); - report(t); - stack.push(transact(t,Active)); - } - - void add(... indexedTransform[] tList) { - transact[] toPush; - for(int a=0; a < tList.length; ++a) - toPush[tList[a].index]=transact(tList[a]); - for(int a=0; a < toPush.length; ++a) - if(!toPush.initialized(a)) - toPush[a]=transact(); - report("Added"); - report(toPush.length); - stack.append(toPush); - } - - bool empty() { - return stack.length == 0; - } -} - -framedTransformStack xformStack; - -void deconstruct(picture pic=currentpicture, real magnification=1) -{ - deconstruct(pic.fit(),currentpatterns,magnification,xformStack.pop); -} -- cgit v1.2.3