-- XBandGraphicsImpl.mesa -- Last changed by Pier, September 19, 1982 9:03 pm -- Last Edited by: Stone, March 21, 1983 5:30 pm DIRECTORY KSpace, CGBandGraphics, CGBandDevice USING [New, Close], CGDevice USING [Rep], GraphicsBasic USING [DeviceRef], Graphics, JaMOps USING [defaultFrame], JaMFnsDefs USING [Register], TJaMGraphicsContexts USING [AddContext, RemoveContext]; XBandGraphicsImpl: PROGRAM IMPORTS Graphics, CGBandDevice, JaMFnsDefs, TJaMGraphicsContexts, JaMOps, KSpace EXPORTS CGBandGraphics = { OPEN G: Graphics, J: JaMFnsDefs; hornetRef: GraphicsBasic.DeviceRef_NIL; platemakerRef: GraphicsBasic.DeviceRef_NIL; screenRef: GraphicsBasic.DeviceRef_NIL; DeviceObject: PUBLIC TYPE = CGDevice.Rep; -- export to GraphicsBasic hornetdc: G.Context_NIL; platemakerdc: G.Context_NIL; screendc: G.Context_NIL; dc: G.Context_NIL; hornetbox, platemakerbox, screenbox: G.Box; GetDC: PUBLIC PROCEDURE RETURNS[G.Context] = { RETURN[dc] }; CloseBands: PROCEDURE = { noop: BOOLEAN _ TRUE; IF hornetRef#NIL THEN { CGBandDevice.Close[hornetRef]; hornetRef_NIL; [] _ TJaMGraphicsContexts.RemoveContext[JaMOps.defaultFrame, $Hornet]}; IF platemakerRef#NIL THEN { CGBandDevice.Close[platemakerRef]; platemakerRef_NIL; [] _ TJaMGraphicsContexts.RemoveContext[JaMOps.defaultFrame, $Platemaker]}; IF screenRef#NIL THEN { CGBandDevice.Close[screenRef]; screenRef_NIL; [] _ TJaMGraphicsContexts.RemoveContext[JaMOps.defaultFrame, $Screen]}; }; HornetDC: PROCEDURE = { KSpace.GetS[]; --reserve a contiguous space for AIS images hornetRef _ CGBandDevice.New[hornet];--bands to Hornet hornetdc _ G.NewContext[hornetRef]; hornetbox _ G.GetBounds[hornetdc]; G.ClipBox[hornetdc,hornetbox]; dc _ hornetdc; KSpace.KillS[]; --return the reserved space TJaMGraphicsContexts.AddContext[frame: JaMOps.defaultFrame, init: GetDC, name: $Hornet, enabled: TRUE, initOnErase: TRUE]; }; PlateMakerDC: PROCEDURE = { KSpace.GetS[]; --reserve a contiguous space for AIS images platemakerRef _ CGBandDevice.New[platemaker];--bands to PlateMakerDC platemakerdc _ G.NewContext[platemakerRef]; platemakerbox _ G.GetBounds[platemakerdc]; G.ClipBox[platemakerdc,platemakerbox]; dc _ platemakerdc; KSpace.KillS[]; --return the reserved space TJaMGraphicsContexts.AddContext[frame: JaMOps.defaultFrame, init: GetDC, name: $Platemaker, enabled: TRUE, initOnErase: TRUE]; }; ScreenDC: PROCEDURE = { --bands to files to (eventually) screen OR checkplot screenRef _ CGBandDevice.New[screen]; screendc _ G.NewContext[screenRef]; screenbox _ G.GetBounds[screendc]; G.ClipBox[screendc,screenbox]; dc _ screendc; TJaMGraphicsContexts.AddContext[frame: JaMOps.defaultFrame, init: GetDC, name: $Screen, enabled: TRUE, initOnErase: TRUE]; }; -- Initialization starts here J.Register[".hornetdc"L,HornetDC]; J.Register[".platemakerdc"L,PlateMakerDC]; J.Register[".screendc"L,ScreenDC]; J.Register[".closebands"L,CloseBands]; }. LOG Removed checkplot facility for Cedar 3.2, July 13, 1982 Ęx˜JšĒĪcVœ2Īk œ,žœžœžœ#žœžœ$žœ4žœžœJžœžœžœ žœ2žœ)žœ%žœžœžœœ žœ žœžœ žœ žœ žœžœ žœ'žœĪnœžœž œžœžœžœ Ÿ œž œžœžœžœ žœžœ4žœQžœžœžœ<žœUžœ žœžœ4žœVŸœž œ,œ'œ žœ&žœžœAœdžœžœ Ÿ œž œ,œ/œžœ.žœžœMœhžœžœ Ÿœž œ5œ5žœ&žœžœ“žœžœ œžœ"žœ*žœ"žœ+žœ:˜‹—…—  Œ