diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-07 16:52:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-07 16:52:56 +0000 |
commit | e1e1d6fa3224440612d3ad6595c413f88d552702 (patch) | |
tree | eaa3301c9fecd1d01baa642b2e483fee4430bcee /Master/texmf-dist/asymptote/plain_strings.asy | |
parent | 0eefec13710bb4d6aff6838a6efc463912506ee9 (diff) |
asymptote 2.37
git-svn-id: svn://tug.org/texlive/trunk@40303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/plain_strings.asy')
-rw-r--r-- | Master/texmf-dist/asymptote/plain_strings.asy | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/texmf-dist/asymptote/plain_strings.asy b/Master/texmf-dist/asymptote/plain_strings.asy index f4c856e8ad9..a88e3863416 100644 --- a/Master/texmf-dist/asymptote/plain_strings.asy +++ b/Master/texmf-dist/asymptote/plain_strings.asy @@ -179,6 +179,11 @@ string graphic(string name, string options="") return "\externalfigure["+name+"]["+options+"]"; } +string graphicscale(real x) +{ + return string(settings.tex == "context" ? 1000*x : x); +} + string minipage(string s, real width=100bp) { if(latex()) @@ -223,4 +228,25 @@ string phantom(string s) return settings.tex != "none" ? "\phantom{"+s+"}" : ""; } +string[] spinner=new string[] {'|','/','-','\\'}; +spinner.cyclic=true; + +void progress(bool3 init=default) +{ + static int count=-1; + static int lastseconds=-1; + if(init == true) { + lastseconds=0; + write(stdout,' ',flush); + } else + if(init == default) { + int seconds=seconds(); + if(seconds > lastseconds) { + lastseconds=seconds; + write(stdout,'\b'+spinner[++count],flush); + } + } else + write(stdout,'\b',flush); +} + restricted int ocgindex=0; |