kopia lustrzana https://github.com/fellesverkstedet/fabmodules
62 wiersze
1.5 KiB
Python
Executable File
62 wiersze
1.5 KiB
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# make_math_eps
|
|
# .math to .eps GUI wrapper
|
|
#
|
|
# Neil Gershenfeld 7/4/13
|
|
# (c) Massachusetts Institute of Technology 2013
|
|
#
|
|
# This work may be reproduced, modified, distributed,
|
|
# performed, and displayed for any purpose, but must
|
|
# acknowledge the fab modules project. Copyright is
|
|
# retained and must be preserved. The work is provided
|
|
# as is; no warranty is provided, and users accept all
|
|
# liability.
|
|
#
|
|
# imports
|
|
#
|
|
import wx,sys
|
|
from fab_set import fab_frame
|
|
from panel_control import control_panel
|
|
from panel_math import math_panel
|
|
from panel_math_png import math_png_panel
|
|
from panel_png_path import png_path_panel
|
|
from panel_path_eps import path_eps_panel
|
|
#
|
|
# command line
|
|
#
|
|
print "command line: make_math_eps [input_file [size]]"
|
|
print " input_file = input .math file (optional)"
|
|
print " size = image panel size (optional)"
|
|
#
|
|
# start wx
|
|
#
|
|
app = wx.App()
|
|
#
|
|
# add panels to frame
|
|
#
|
|
frame = fab_frame("make_math_eps",sys.argv)
|
|
frame.control_panel = control_panel(frame)
|
|
frame.sizer.Add(frame.control_panel,(0,0),span=(1,4),flag=wx.ALIGN_CENTER_HORIZONTAL)
|
|
frame.math_panel = math_panel(frame)
|
|
frame.sizer.Add(frame.math_panel,(1,0))
|
|
frame.png_panel = math_png_panel(frame)
|
|
frame.sizer.Add(frame.png_panel,(1,1))
|
|
frame.path_panel = png_path_panel(frame)
|
|
frame.sizer.Add(frame.path_panel,(1,2))
|
|
frame.eps_panel = path_eps_panel(frame)
|
|
frame.sizer.Add(frame.eps_panel,(1,3))
|
|
#
|
|
# defaults
|
|
#
|
|
frame.set_math_eps()
|
|
#
|
|
# fit and show frame
|
|
#
|
|
frame.Fit()
|
|
frame.Show()
|
|
#
|
|
# start mainloop
|
|
#
|
|
app.MainLoop()
|