Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!prlb2!bernard From: bernard@prlb2.UUCP (Bernard Yves) Newsgroups: comp.windows.news Subject: NeWSillustrator (part 5 of 5) Message-ID: <530@prlb2.UUCP> Date: 27 Jan 89 13:27:17 GMT Organization: Philips Research Laboratory, Brussels Lines: 1195 %-------------------------------------------------------------------------------- /ConfirmText? {%message => bool get_textstring append ( ??) append Confirm? } def /CommandWinMenu [ (Redisplay) {/PaintClient CommandWindow send pause /PaintClient win send pause KillDefComProcess} (Zoom In) {/ZoomIn win send} (Zoom Out) {/ZoomOut win send} (----) {} (Font => ) fontmenu (FontSize => ) pointsizemenu (Files => ) filemenu (----) {} (Make Tool) {MakeNewCommand} ] /new DefaultMenu send def /MakeCommandWindow { /CommandWindow framebuffer /new MyWindowClass send def { /PaintClient { ClientCanvas setcanvas 1 fillcanvas CommandTable 0 Ncommand getinterval {/display exch send} forall pause pause DefaultCommand null ne {/hilite DefaultCommand send} if } def /ClientMenu CommandWinMenu def /FrameLabel (NeWSillustrator - Tools Palette) def /IconLabel (Tools) def } CommandWindow send ToolPalettePosition null eq {/reshapefromuser CommandWindow send} {ToolPalettePosition aload pop /reshape CommandWindow send} ifelse /map CommandWindow send {ClientCanvas} CommandWindow send setcanvas % Create event manager to select command. /selectmgr [ LeftMouseButton %a new command is selected { KillDefComProcess select_command %exec the selected com /hilite DefaultCommand send MakeDefComProcess} DownTransition {ClientCanvas} CommandWindow send eventmgrinterest % interest MiddleMouseButton %a new command is selected as default { KillDefComProcess select_command LastCommand null ne LastCommand? and {LastCommand /CanBeDefault? get {/DefaultCommand LastCommand store} if } if /hilite DefaultCommand send MakeDefComProcess } DownTransition {ClientCanvas} CommandWindow send eventmgrinterest % interest ] forkeventmgr def pause MakeDefComProcess pause } def /select_command{ %the event is in CurrentEvent CurrentEvent begin XLocation YLocation end %x y of click find_command dup null ne %command {/deshilite DefaultCommand send /execcommand exch send } {pop} ifelse } def /foundcommand null def /find_command{% x y => command | null; %if found, the command is highlited /foundcommand null store CommandTable 0 Ncommand getinterval {%x y com 3 copy %x y com x y com /is_in_obj exch send {/foundcommand exch store exit} {pop} ifelse } forall pop pop foundcommand null ne { LastCommand null ne LastCommand? and {/deshilite LastCommand send} if /hilite foundcommand send} if foundcommand } def %------------------------------------------------------------------------ % alphanumeric input of tool arguments %high-level event ; the value - coord, angle or scale factors %will be in /ClientData %the followint event types (Name) are recorded in macro % /Command, /AlphaEvent (action /Point /Move /Rotate /Scale /String /Stop) % /Param, /Dparam % these events are stored as 3 dict begin /Name /Action /ClientData end (alphanum input\n) printdbg /MakeEventToRecord{% data action name => myevent 3 dict dup begin %data action name ev 4 1 roll /Name exch def /Action exch def /ClientData exch def end } def /MakeEventToSend{% data action name => NeWS event createevent dup begin %data action name ev 4 1 roll /Name exch def /Action exch def /ClientData exch def end } def /PointEvent null /Point /AlphaEvent MakeEventToSend def /MoveEvent null /Move /AlphaEvent MakeEventToSend def % /RotateEvent null /Rotate /AlphaEvent MakeEventToSend def /ScaleEvent null /Scale /AlphaEvent MakeEventToSend def /WaitForEvent PointEvent def /ParseDataDict dictbegin /argarray 10 array def /argtop 0 def /iarg 0 def /GoodType {% /type1 /type2 exch dup /num eq {%/type2 /num pop dup /integertype eq exch /realtype eq or} {eq} ifelse } def dictend def /DataFormat null def /ParseData{ % string => argument bool % true if the string contains an argument compatible % with the DataFormat ParseDataDict begin /argtop 0 store {token {% post token dup type %post token t dup /integertype eq exch %post token ib t /realtype eq or %post token b {argarray exch argtop exch put /argtop argtop 1 add store %post } {exit} ifelse %post } {exit} ifelse } loop /iarg 0 store DataFormat {% type argarray iarg get type GoodType {/iarg iarg 1 add store} {/iarg -1 store exit} ifelse } forall iarg -1 eq {false} { iarg 1 eq {argarray 0 get} {[ argarray 0 iarg getinterval aload pop ]} ifelse true} ifelse end } def /SendAlphaEvent {% reads the string in the CP data item % and sends as an AlphaEvent it if matches the awaited event items begin alphadata /ItemValue get end WaitForEvent /Action get /Rotate eq {/DataFormat [/num] store} {/DataFormat [/num /num] store} ifelse ParseData {% data WaitForEvent begin Action Name end MakeEventToSend sendevent pause } {(data do not match awaited event) prerror} ifelse } def /RecordEvents? false def %------------------------------------------------------------------------- %Tool definition %----------------------------------------------------------------------- (Tool Definition\n) printdbg /topcom {CommandTable Ncommand 1 sub get} def %Select /new CommandObj send dup AddCommand mark 11 537.88 1 1 0 [ 11 537.88 44 571.376 ] -1 0 0 0 0 0 [ %group geometry /new Polyline send mark 0 32.928 1 1 0 [ 0 0 31.4561 32.928 ] -1 5 0 0 0 0 [ %polyg. geom [ 31.4561 -32.928 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 21.006 1 1 0 [ 0 21.006 10.847 33.496 ] -1 5 0 0 0 0 [ %polyg. geom [ 0 12.49 ] [ 10.847 12.49 ] ] %end of polyg. geom true 2 false 0 false false loadobj ] %end of group geometry false 2 /Select loadobj { /CanBeDefault? true def /execproc { select_object } def } topcom send /DefaultCommand topcom def %Rect /new CommandObj send dup AddCommand mark 11 480.54 1 1 0 [ 11 480.54 45.168 512.9002 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 32.3602 1 1 0 [ 0 0 34.168 32.3602 ] -1 0 0 0 0 0 [ 34.168 -32.3602 ] true loadobj ] %end of group geometry false 1 /Rectangle loadobj { /execproc { DrawObject create_object } def /CanBeDefault? true def } topcom send %Line /new CommandObj send dup AddCommand mark 11 420.929 1 1 0 [ 11 420.929 45.168 460.102 ] -1 0 0 0 0 0 [ %group geometry /new Polyline send mark 0 39.173 1 1 0 [ 0 0 34.168 39.173 ] -1 0 0 0 0 0 [ %polyg. geom [ 7.051 -33.496 ] [ 16.813 -10.219 ] [ 34.168 -39.173 ] ] %end of polyg. geom true 3 false 0 false false loadobj ] %end of group geometry false 1 /Polyline loadobj { /CanBeDefault? true def /execproc { Polyline create_object } def} topcom send %Polygon /new CommandObj send dup AddCommand mark 11 364.724 1 1 0 [ 11 364.724 45.7102 403.3291 ] -1 0 0 0 0 0 [ %group geometry /new Polyline send mark 0 38.6051 1 1 0 [ 0 0 34.7102 38.6051 ] -1 0 0 0 0 0 [ %polyg. geom [ 9.22 -38.6051 ] [ 34.7102 -28.3861 ] [ 20.6091 -13.058 ] [ 34.168 -1.703 ] ] %end of polyg. geom true 4 true 0 false false loadobj ] %end of group geometry false 1 /Polygon loadobj { /CanBeDefault? true def /execproc {Polyline create_object current_selection null ne {current_selection begin /Closed true store end /display current_selection send} if } def} topcom send %Curve /new CommandObj send dup AddCommand mark 11 301.139 1 1 0 [ 11 301.139 47.337 348.26 ] -1 0 0 0 0 0 [ %group geometry /new Curve send mark 0 47.121 1 1 0 [ 0 0 36.337 47.121 ] -1 0 0 0 0 0 [ %polyg. geom [ 2.216 -19.8403 ] [ 11.5213 -29.761 ] [ 19.498 -20.4603 ] [ 25.259 -11.1601 ] [ 32.792 -17.3602 ] [ 36.337 -47.121 ] ] %end of polyg. geom true 6 false 0 false false loadobj ] %end of group geometry false 1 /Curve loadobj {/CanBeDefault? true def /execproc { Curve create_object } def} topcom send %RoundedRect /new CommandObj send dup AddCommand mark 11 252.3141 1 1 0 [ 11 252.3141 45.7102 290.3521 ] -1 0 0 0 0 0 [ %group geometry /new RoundedRect send mark 0 38.038 1 1 0 [ 0 0 34.7102 38.038 ] -1 0 0 0 0 0 [ 34.7102 -38.038 ] true 14 loadobj ] %end of group geometry false 1 /RoundRect loadobj {/CanBeDefault? true def /execproc {RoundedRect create_object} def } topcom send %Oval /new CommandObj send dup AddCommand mark 11 191 1 1 0 [ 11 191 45.7102 232.444 ] -1 0 0 0 0 0 [ %group geometry /new Oval send mark 0 41.444 1 1 0 [ 0 0 34.7102 41.444 ] -1 0 0 0 0 0 [ 34.7102 -41.444 ] true loadobj ] %end of group geometry false 1 /Oval loadobj {/CanBeDefault? true def /execproc {Oval create_object} def} topcom send %Text /new CommandObj send dup AddCommand mark 11 129 1 1 0 [ 11 129 58 174 ] -1 0 0 0 0 0 [ %group geometry /new TextObject send mark 7 13 0.578 0.585 0 [ 7 13 39.3673 25.287 ] 0 0 0 0 0 0 (Text) true /Times-Roman 30 21 56 loadobj /new DrawObject send mark 0 45 1 1 0 [ 0 0 47 45 ] -1 0 0 0 0 0 [ 47 -45 ] true loadobj ] %end of group geometry false 2 /Text loadobj {/CanBeDefault? true def /execproc {TextObject create_object } def} topcom send %Group /new CommandObj send dup AddCommand mark 11 71.488 1 1 0 [ 11 71.488 48.572 115.3771 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 37.572 43.8891 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0.578 43.8891 1 1 0 [ 0.578 32.1853 10.983 43.8891 ] -1 0 0 0 0 0 [ 10.405 -11.704 ] true loadobj /new Polyline send mark 13.295 17.556 1 1 0 [ 13.295 17.556 29.48 31.015 ] -1 0 0 0 0 0 [ %polyg. geom [ 16.185 0 ] [ 5.7802 13.4592 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 24.8553 11.704 1 1 0 [ 24.8553 0 37.572 11.704 ] -1 0 0 0 0 0 [ 12.717 -11.704 ] true loadobj /new DrawObject send mark 0 43.8891 1 1 0 [ 0 0 37.572 43.8891 ] -1 0 0 1 0 0 [ 37.572 -43.8891 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /Group loadobj {/CanBeDefault? true def /execproc {Group create_object} def } topcom send %ImportPS /new CommandObj send dup AddCommand mark 11 13 1 1 0 [ 11 13 59 56 ] -1 0 0 0 0 0 [ %group geometry /new TextObject send mark 12 14 0.578 0.585 0 [ 12 14 31.074 26.8721 ] 0 0 0 0 0 0 (PS) true /Times-Roman 30 22 33 loadobj /new DrawObject send mark 0 43 1 1 0 [ 0 0 48 43 ] -1 0 0 0 0 0 [ 48 -43 ] true loadobj ] %end of group geometry false 2 /ImportPS loadobj { /execproc {PostScript create_object} def} topcom send %Move /new CommandObj send dup AddCommand mark 83 531.265 1 1 0 [ 83 531.265 127.694 571.861 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 23 18.735 1 1 0 [ 23 0 44.694 18.735 ] -1 0 0 0 0 0 [ 21.694 -18.735 ] true loadobj /new DrawObject send mark 0 40.596 1 1 0 [ 0 21.861 21.694 40.596 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj ] %end of group geometry false 2 /Move loadobj { /execproc {/crosshair? true def /drag_and_trans fapply_on_sel /crosshair? false def /commandswitch [/ClickToMove? ClickToMove?] store } def } topcom send %Rotate /new CommandObj send dup AddCommand mark 83 477.051 1 1 0 [ 83 477.051 111.647 510.517 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 18.735 1 1 0 [ 0 0 21.694 18.735 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj /new DrawObject send mark 0 18.735 1 1 42.7681 [ 0 4.982 28.647 33.466 ] -1 0 0 0 0 0 [ 21.694 -18.735 ] true loadobj ] %end of group geometry false 2 /Rotate loadobj { /execproc {/drag_and_rotate fapply_on_sel} def } topcom send %Scale /new CommandObj send dup AddCommand mark 83 418.0071 1 1 0 [ 83 418.0071 122.592 456.6123 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 38.6051 1 1 0 [ 0 19.8702 21.694 38.6051 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj /new DrawObject send mark 0 38.038 1 1 0 [ 0 0 39.592 38.038 ] -1 0 0 0 0 0 [ 39.592 -38.038 ] true loadobj ] %end of group geometry false 2 /Scale loadobj { /execproc {/drag_and_scale fapply_on_sel} def } topcom send %Copy /new CommandObj send dup AddCommand mark 83 359.265 1 1 0 [ 83 359.265 129.694 402.111 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 42.846 1 1 0 [ 0 24.111 21.694 42.846 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj /new DrawObject send mark 25 18.735 1 1 0 [ 25 0 46.694 18.735 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj ] %end of group geometry false 2 /Copy loadobj { /param dictbegin /xr 0 def /yr 0 def dictend store /execproc {{ /old_selection current_selection store /current_selection /clone current_selection send store /erase_flag false store /crosshair? true store /drag_and_trans current_selection send /crosshair? false store /erase_flag true store Abort? {/current_selection old_selection store} {current_selection AddObject current_selection push_selection param begin /xr current_selection /X get old_selection /X get sub store /yr current_selection /Y get old_selection /Y get sub store end} ifelse } apply_on_sel} def /repeatproc {{ /old_selection current_selection store /current_selection /clone current_selection send store current_selection begin /X X param /xr get add store /Y Y param /yr get add store end /make_bbox current_selection send /display current_selection send Cancel? { /erase current_selection send /current_selection old_selection store } {current_selection AddObject current_selection push_selection } ifelse } apply_on_sel} def } topcom send %Move Up /new CommandObj send dup AddCommand mark 82 295.2652 1 1 0 [ 82 295.2652 127 346.0002 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 12 32.735 1 1 0 [ 12 0 45 32.735 ] 0.5 0 0 0 0 0 [ 33 -32.735 ] true loadobj /new DrawObject send mark 0 50.735 1 1 0 [ 0 18 33 50.735 ] -1 3 0 0 0 0 [ 33 -32.735 ] true loadobj ] %end of group geometry false 2 /MoveUp loadobj { /execproc {{ current_selection move_up dup null ne {/display exch send /display current_selection send} {(no overlapping object over selection) prmessage} ifelse } apply_on_sel } def } topcom send %Move Down /new CommandObj send dup AddCommand mark 79 241.2652 1 1 0 [ 79 241.2652 126 290.0002 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 48.735 1 1 0 [ 0 16 33 48.735 ] -1 3 0 0 0 0 [ 33 -32.735 ] true loadobj /new DrawObject send mark 14 32.735 1 1 0 [ 14 0 47 32.735 ] 0.5 0 0 0 0 0 [ 33 -32.735 ] true loadobj ] %end of group geometry false 2 /MoveDown loadobj { /execproc {{ current_selection move_down dup null ne {/display current_selection send /display exch send} {(no overlapping object behind selection) prmessage} ifelse } apply_on_sel } def } topcom send %Delete /new CommandObj send dup AddCommand mark 83 190.974 1 1 0 [ 83 190.974 119.3373 228.444 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 8 29.026 1 1 0 [ 8 10.291 29.694 29.026 ] -1 3 0 0 0 0 [ 21.694 -18.735 ] true loadobj /new Polyline send mark 0 37.47 1 1 0 [ 0 1.703 36.3373 37.47 ] -1 0 0 0 0 0 [ %polyg. geom [ 36.3373 -35.767 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 0 1 1 0 [ 0 0 33.0832 37.47 ] -1 0 0 0 0 0 [ %polyg. geom [ 33.0832 37.47 ] ] %end of polyg. geom true 1 false 0 false false loadobj ] %end of group geometry false 3 /Delete loadobj { /param 10 dict def /execproc { param begin /deleted null def end { /delete current_selection send param begin /deleted current_selection def end pop_selection} apply_on_sel} def /undoproc { {ClientCanvas} win send setcanvas param begin deleted null ne { /getclassname deleted send /Group eq /getclassname deleted send /ClippingGroup eq or { gsave deleted begin /X 0 store /Y 0 store /Angle 0 store /Sx 1 store /Sx 1 store geom end /set_geom deleted send grestore} if gsave /display deleted send /current_selection deleted store DeleteFreeEntries current_selection /tableindex get ObjTable exch current_selection put current_selection push_selection grestore } if end } def } topcom send %Destroy /new CommandObj send dup AddCommand mark 83 122.086 1 1 0 [ 83 122.086 129.243 172.998 ] -1 0 0 0 0 0 [ %group geometry /new Polyline send mark 0 28.914 1 1 0 [ 0 17.914 14 28.914 ] -1 0 0 0 0 0 [ %polyg. geom [ 14 -11 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new DrawObject send mark 0 46.815 1 1 0 [ 0 35.111 10.405 46.815 ] -1 3 0 0 0 0 [ 10.405 -11.704 ] true loadobj /new Polyline send mark 0 20.482 1 1 0 [ 0 20.482 16.185 33.9412 ] -1 3 0 0 0 0 [ %polyg. geom [ 16.185 0 ] [ 5.7802 13.4592 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 0 14.63 1 1 0 [ 0 2.926 12.717 14.63 ] -1 3 0 0 0 0 [ 12.717 -11.704 ] true loadobj /new DrawObject send mark 0 46.815 1 1 0 [ 0 2.926 37.5721 46.815 ] -1 3 0 1 0 0 [ 37.572 -43.8891 ] true loadobj /new Polyline send mark 0 50.912 1 1 0 [ 0 0 46.243 50.912 ] -1 0 0 0 0 0 [ %polyg. geom [ 46.243 -50.912 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 0 1 1 0 [ 0 0 46.243 49.741 ] -1 0 0 0 0 0 [ %polyg. geom [ 46.243 49.741 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 16.185 48.805 1 1 0 [ 0 32.42 16.185 48.805 ] -1 0 0 0 0 0 [ %polyg. geom [ -16.185 -16.3852 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 15.449 1 1 0 [ 0 1.404 13.873 15.449 ] -1 0 0 0 0 0 [ %polyg. geom [ 13.873 -14.045 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 0.8191 1 1 0 [ 0 0.8191 15.029 14.8641 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.029 14.045 ] ] %end of polyg. geom true 1 false 0 false false loadobj /new Polyline send mark 0 16.914 1 1 0 [ 0 16.914 15 31.914 ] -1 0 0 0 0 0 [ %polyg. geom [ 15 15 ] ] %end of polyg. geom true 1 false 0 false false loadobj ] %end of group geometry false 11 /Destroy loadobj { /param 10 dict def /undoproc { {ClientCanvas} win send setcanvas param begin deleted null ne { %the table entry may not be the same /getclassname deleted send /Group eq /getclassname deleted send /ClippingGroup eq or { /undestroy deleted send /display deleted send /current_selection deleted store DeleteFreeEntries current_selection /tableindex get ObjTable exch current_selection put current_selection push_selection } if } if end } def /execproc { param begin /deleted null def end { param begin /deleted current_selection def end /destroy current_selection send pop_selection} apply_on_sel } def } topcom send %Edit /new CommandObj send dup AddCommand mark 83 66.552 1 1 0 [ 83 66.552 121.1501 104.589 ] -1 0 0 0 0 0 [ %group geometry /new Polyline send mark 0 38.037 1 1 0 [ 0 0.585 28.902 38.037 ] -1 3 0 0 0 0 [ %polyg. geom [ 7.677 -37.452 ] [ 28.902 -27.538 ] [ 17.1602 -12.6673 ] [ 28.45 -1.6521 ] ] %end of polyg. geom true 4 true 0 false false loadobj /new Polyline send mark 0 37.452 1 1 0 [ 0 0 38.1501 37.452 ] -1 0 0 0 0 0 [ %polyg. geom [ 7.677 -37.452 ] [ 38.1501 -12.874 ] [ 17.1602 -12.6673 ] [ 28.45 -1.6521 ] ] %end of polyg. geom true 4 true 0 false false loadobj ] %end of group geometry false 2 /Edit loadobj { /execproc {/edit_geom fapply_on_sel} def } topcom send %Clip /new CommandObj send dup AddCommand mark 83 3 1 1 0 [ 83 3 121.728 51.571 ] -1 0 0 0 0 0 [ %group geometry /new Curve send mark 0 48.571 1 1 0 [ 0 0 38.728 48.571 ] -1 5 0 0 0 0 [ %polyg. geom [ 2.3613 -20.451 ] [ 12.28 -30.676 ] [ 20.781 -21.09 ] [ 26.9203 -11.504 ] [ 34.9493 -17.8943 ] [ 38.728 -48.571 ] ] %end of polyg. geom true 6 false 0 false false loadobj /new ClippingGroup send mark 0 5.267 1 1 0 [ 0 5.267 36.994 47.986 ] -1 0 0 0 0 0 [ %group geometry /new Oval send mark 0 42.719 1 1 0 [ 0 0 36.994 42.719 ] 1 0 0 0 0 0 [ 36.994 -42.719 ] true loadobj /new Curve send mark -2.312 43.304 1 1 0 [ -2.312 -5.267 36.416 43.304 ] -1 0 0 0 0 0 [ %polyg. geom [ 2.3613 -20.451 ] [ 12.28 -30.676 ] [ 20.781 -21.09 ] [ 26.9203 -11.504 ] [ 34.9493 -17.8943 ] [ 38.728 -48.571 ] ] %end of polyg. geom true 6 false 0 false false loadobj ] %end of group geometry true 2 loadobj ] %end of group geometry false 2 /Clip loadobj { /execproc {{make_clip current_selection send} fapply_on_sel} def } topcom send %Align Left /new CommandObj send dup AddCommand mark 155 530.2944 1 1 0 [ 155 530.2944 190.253 572.8742 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 35.253 42.58 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 42.58 1 1 0 [ 0 31.225 9.7622 42.58 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj /new Polyline send mark 0 17.033 1 1 0 [ 0 17.033 15.186 30.091 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 0 11.355 1 1 0 [ 0 0 11.932 11.355 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new DrawObject send mark 0 42.58 1 1 0 [ 0 0.001 35.253 42.58 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /AlignLeft loadobj { /execproc {{/align_left self send} align_op} def } topcom send %A Bottom /new CommandObj send dup AddCommand mark 155.0002 473.9692 1 1 0 [ 155.0002 473.9692 197.679 509.343 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 42.679 0.121 1 1 90.163 [ 0 0 42.679 35.3732 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0 42.5792 1 1 0 [ 0 31.225 9.7621 42.5792 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj /new Polyline send mark 0 17.032 1 1 0 [ 0 17.032 15.186 30.0893 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 0 11.3543 1 1 0 [ 0 0 11.932 11.355 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new DrawObject send mark 0 42.5792 1 1 0 [ 0 0 35.253 42.5792 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /AlignBottom loadobj { /execproc {{/align_bottom self send} align_op} def } topcom send %A Right /new CommandObj send dup AddCommand mark 155 414.479 1 1 0 [ 155 414.479 190.253 457.0582 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 35.253 42.5792 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 25.4903 42.5792 1 1 0 [ 25.4903 31.225 35.253 42.5792 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj /new Polyline send mark 20.067 17.032 1 1 0 [ 20.067 17.032 35.253 30.0893 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 23.321 11.3543 1 1 0 [ 23.321 0 35.253 11.355 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new DrawObject send mark 0 42.5792 1 1 0 [ 0 0 35.253 42.5792 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /AlignRight loadobj { /execproc {{/align_right self send} align_op} def } topcom send %A Top /new CommandObj send dup AddCommand mark 155 359.289 1 1 0 [ 155 359.289 197.679 395.855 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 42.679 36.566 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0.1 0 1 1 90.163 [ 0 0 42.679 35.373 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj /new Oval send mark 29.929 24.5002 1 1 90.163 [ 29.895 24.5003 41.283 36.464 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new Polyline send mark 24.5053 21.1262 1 1 90.163 [ 11.433 21.1262 24.5053 36.312 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new DrawObject send mark 0.1 26.7711 1 1 90.163 [ 0.0722 26.7711 11.4542 36.566 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /AlignTop loadobj { /execproc {{/align_top self send} align_op} def } topcom send %C vert /new CommandObj send dup AddCommand mark 155 299.7983 1 1 0 [ 155 299.7983 190.253 342.378 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 35.253 42.5792 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 12.7451 42.5792 1 1 0 [ 12.7451 31.225 22.5073 42.5792 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj /new Polyline send mark 10.0333 17.032 1 1 0 [ 10.0333 17.032 25.2191 30.0893 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new Oval send mark 11.661 11.3543 1 1 0 [ 11.6603 0 23.592 11.355 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new DrawObject send mark 0 42.5792 1 1 0 [ 0 0 35.253 42.5792 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /CenterV loadobj { /execproc {{/center_vertical self send} align_op} def } topcom send %C hor /new CommandObj send dup AddCommand mark 155 247 1 1 0 [ 155 247 197.679 282.373 ] -1 0 0 0 0 0 [ %group geometry /new Group send mark 0 0 1 1 0 [ 0 0 42.679 35.373 ] -1 0 0 0 0 0 [ %group geometry /new DrawObject send mark 0.1 0 1 1 90.163 [ 0 0 42.679 35.373 ] -1 0 0 1 0 0 [ 35.253 -42.5792 ] true loadobj /new Oval send mark 29.929 12.25 1 1 90.163 [ 29.895 12.2501 41.283 24.214 ] -1 0 0 0 0 0 [ 11.932 -11.355 ] true loadobj /new Polyline send mark 24.5053 10.563 1 1 90.163 [ 11.433 10.563 24.5053 25.749 ] -1 0 0 0 0 0 [ %polyg. geom [ 15.186 0 ] [ 5.4233 13.058 ] ] %end of polyg. geom true 2 true 0 false false loadobj /new DrawObject send mark 0.1 13.386 1 1 90.163 [ 0.0722 13.386 11.4542 23.18 ] -1 0 0 0 0 0 [ 9.7621 -11.355 ] true loadobj ] %end of group geometry true 4 loadobj ] %end of group geometry false 1 /CenterH loadobj { /execproc {{/center_horizontal self send} align_op} def } topcom send %repeat /new CommandObj send dup AddCommand mark 152 187 1 1 0 [ 152 187 205 234 ] -1 0 0 0 0 0 [ %group geometry /new TextObject send mark 2 20 0.6 1.0024 0 [ 2 20 52.3723 41.051 ] 0 0 0 0 0 0 (Repeat) true /Times-Roman 30 21 84 loadobj /new DrawObject send mark 0 47 1 1 0 [ 0 0 53 47 ] -1 0 0 0 0 0 [ 53 -47 ] true loadobj ] %end of group geometry false 2 /Repeat loadobj { /execproc{ LastCommand null ne {LastCommand? %a command {/repeatproc LastCommand send} {/execmacro LastCommand send} ifelse } if } def} topcom send /RepeatCommand topcom def %Undo /new CommandObj send dup AddCommand mark 152 126 1 1 0 [ 152 126 205 173 ] -1 0 0 0 0 0 [ %group geometry /new TextObject send mark 2 16.7373 0.732 0.9184 0 [ 2 16.7373 51.777 36.944 ] 0 0 0 0 0 0 (Undo) true /Times-Roman 30 22 68 loadobj /new DrawObject send mark 0 47 1 1 0 [ 0 0 53 47 ] -1 0 0 0 0 0 [ 53 -47 ] true loadobj ] %end of group geometry false 2 /Undo loadobj { /execproc { LastCommand null ne { {undoproc} LastCommand send } if } def } topcom send %redefines that in your .NeWSillustrator to [x y w h] /ControlPanelPosition null def /DrawingAreaPosition null def /ToolPalettePosition null def /WindowPositions{%print in the message panel the 3 windows position (CP: % % % %, DA: % % % %, TP: % % % %) [{FrameX FrameY FrameWidth FrameHeight} controlpanel send {FrameX FrameY FrameWidth FrameHeight} win send {FrameX FrameY FrameWidth FrameHeight} CommandWindow send ] sprintf prmessage } def (Window definition \n) printdbg /WinMenu [ (Redisplay) {/PaintClient ThisWindow send} (Zoom In) {/ZoomIn ThisWindow send} (Zoom Out) {/ZoomOut ThisWindow send} (Font => ) fontmenu (FontSize => ) pointsizemenu (Files IO => ) filemenu (-------) { } ] /new DefaultMenu send def /win framebuffer /new ScrollAndZoomWindow send def { /PaintClient { ClientCanvas setcanvas 1 fillcanvas /display a4rect send RepaintAll } def /FrameLabel (NeWSillustrator - Drawing Area) def /IconLabel (Drawing Area) def /ClientMenu WinMenu def } win send %user file (.NeWSillustrator\n) printdbg (HOME) getenv (/.NeWSillustrator) append LoadFile pop MakeControlPanel DrawingAreaPosition null eq {/reshapefromuser win send} { DrawingAreaPosition aload pop /reshape win send} ifelse /map win send 1000 1000 /Resize win send {/Scroll win send} {/Scroll win send} /SetNotifiers win send win /ClientCanvas get setcanvas win begin /overlaycan ClientCanvas createoverlay store end MakeCommandWindow /Started 1 def /FirstUserCommand Ncommand def %end %end NeWSillustratorDict