summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/animation.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-24 18:33:44 +0000
committerKarl Berry <karl@freefriends.org>2021-02-24 18:33:44 +0000
commitdbd941ed19b558edd09219a372b2b0832957b283 (patch)
tree9c6af6f3924d8b1fff6638e510a907306342fa7d /Master/texmf-dist/asymptote/animation.asy
parenta360890a6c2a4befab6b48084d0731ad09c46631 (diff)
asymptote 2.69 support files
git-svn-id: svn://tug.org/texlive/trunk@57876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/animation.asy')
-rw-r--r--Master/texmf-dist/asymptote/animation.asy14
1 files changed, 7 insertions, 7 deletions
diff --git a/Master/texmf-dist/asymptote/animation.asy b/Master/texmf-dist/asymptote/animation.asy
index f12ee75f2ba..1ce89c60e6e 100644
--- a/Master/texmf-dist/asymptote/animation.asy
+++ b/Master/texmf-dist/asymptote/animation.asy
@@ -30,14 +30,14 @@ struct animation {
string prefix;
bool global; // If true, use a global scaling for all frames; this requires
// extra memory since the actual shipout is deferred until all frames have
- // been generated.
+ // been generated.
void operator init(string prefix="", bool global=true) {
prefix=replace(stripdirectory(outprefix(prefix))," ","_");
this.prefix=prefix;
this.global=global;
}
-
+
string basename(string prefix=stripextension(prefix)) {
return "_"+prefix;
}
@@ -57,14 +57,14 @@ struct animation {
plain.shipout(name,f,format=format,view=false);
files.push(name+"."+format);
}
-
+
void add(picture pic=currentpicture, enclosure enclosure=NoBox) {
if(global) {
++index;
pictures.push(pic.copy());
} else this.shipout(enclosure(pic.fit()));
}
-
+
void purge(bool keep=settings.keep) {
if(!keep) {
for(int i=0; i < files.length; ++i)
@@ -130,7 +130,7 @@ struct animation {
return s;
}
- bool pdflatex()
+ bool pdflatex()
{
return latex() && pdf();
}
@@ -143,13 +143,13 @@ struct animation {
if(!pdflatex())
abort("inline pdf animations require -tex pdflatex or -tex xelatex");
if(settings.outformat != "") settings.outformat="pdf";
-
+
string filename=basename();
string pdfname=filename+".pdf";
if(global)
export(filename,enclosure,multipage=multipage);
-
+
if(!keep) {
exitfcn currentexitfunction=atexit();
void exitfunction() {