diff options
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; |