mirror of
https://github.com/chriswolfvision/eplot.git
synced 2025-05-06 06:46:43 +08:00
add canvas with mousing and open options
This commit is contained in:
parent
a656036f0a
commit
de7db8a194
17
eplot
17
eplot
@ -81,6 +81,7 @@ Output file format options:
|
|||||||
-p --postscript Output to the postscript file foo.ps
|
-p --postscript Output to the postscript file foo.ps
|
||||||
-a --pdf Output to the pdf file foo.pdf
|
-a --pdf Output to the pdf file foo.pdf
|
||||||
-e --emf Output to the emf file foo.emf
|
-e --emf Output to the emf file foo.emf
|
||||||
|
-c --canvas Output to the HTML5 canvas enhanced mousing file foo.html
|
||||||
-o <fname> Specify the output filename
|
-o <fname> Specify the output filename
|
||||||
-d --dumb Output to dumb terminal (ascii art)
|
-d --dumb Output to dumb terminal (ascii art)
|
||||||
|
|
||||||
@ -103,6 +104,7 @@ Miscellaneous opions:
|
|||||||
-B <pos>,<height> creates vertical bars (separated by @)
|
-B <pos>,<height> creates vertical bars (separated by @)
|
||||||
e.g. -B 100,0.8@200,0.8
|
e.g. -B 100,0.8@200,0.8
|
||||||
-D --dump dump all used files as "eplot-dump-<nr>.dat"
|
-D --dump dump all used files as "eplot-dump-<nr>.dat"
|
||||||
|
-O --open Immediately open output file
|
||||||
-h --help print this help message
|
-h --help print this help message
|
||||||
-v --version print version information
|
-v --version print version information
|
||||||
MARKER_MESSAGE
|
MARKER_MESSAGE
|
||||||
@ -170,6 +172,11 @@ class OptionController
|
|||||||
com=com+"set terminal emf \"helvetica\";\n"
|
com=com+"set terminal emf \"helvetica\";\n"
|
||||||
@o["OutputFileDefault"]="foo.emf"
|
@o["OutputFileDefault"]="foo.emf"
|
||||||
|
|
||||||
|
# ---- Do we create HTML output?
|
||||||
|
when /^-c$|^--canvas$/
|
||||||
|
com=com+"set terminal canvas enhanced mousing;\n"
|
||||||
|
@o["OutputFileDefault"]="foo.html"
|
||||||
|
|
||||||
# ---- Do we create PDF output? First we create postscript
|
# ---- Do we create PDF output? First we create postscript
|
||||||
# ---- A conversion is done afterwards
|
# ---- A conversion is done afterwards
|
||||||
when /^-a$|^--acrobat$|--pdf$/
|
when /^-a$|^--acrobat$|--pdf$/
|
||||||
@ -181,6 +188,10 @@ class OptionController
|
|||||||
@o["OutputFileSpecified"]=checkOptArg(xargv,i)
|
@o["OutputFileSpecified"]=checkOptArg(xargv,i)
|
||||||
i=i+1
|
i=i+1
|
||||||
|
|
||||||
|
# ---- Open output file
|
||||||
|
when /^-O$|^--open$/
|
||||||
|
@o["OpenFile"]=true
|
||||||
|
|
||||||
# ---- Do we print to dumb terminal?
|
# ---- Do we print to dumb terminal?
|
||||||
when /^-d$|^--dumb$/
|
when /^-d$|^--dumb$/
|
||||||
com=com+"set terminal dumb;\n"
|
com=com+"set terminal dumb;\n"
|
||||||
@ -408,6 +419,12 @@ class Controller
|
|||||||
com="rm -f foo.ps foo.epsi"
|
com="rm -f foo.ps foo.epsi"
|
||||||
printAndRun(com)
|
printAndRun(com)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if @oc["OpenFile"]
|
||||||
|
file = @oc["OutputFileSpecified"]!="" ? @oc["OutputFileSpecified"] : @oc["OutputFileDefault"]
|
||||||
|
com="open #{file}"
|
||||||
|
printAndRun(com)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user