(FILECREATED " 9-May-84 17:12:31" {PHYLUM}<JELLINEK>BIZGRAFIX>TWOD.;4 9796 changes to: (FNS TwoD.Reshapefn) previous date: " 6-Apr-84 10:24:03" {PHYLUM}<JELLINEK>BIZGRAFIX>TWOD.;3) (PRETTYCOMPRINT TWODCOMS) (RPAQQ TWODCOMS ((FNS TwoD.BitBLT TwoD.DrawBetween TwoD.DrawLine TwoD.DrawTo TwoD.Init TwoD.InitViewport restoreDSPCLIPPINGREGION TwoD.MoveTo TwoD.PlotAt TwoD.RelDrawTo TwoD.Reshapefn TwoD.SetViewport TwoD.SetWindowViewport TwoD.SetWorld TwoD.WorldToScreen fracOfHeight fracOfWidth))) (DEFINEQ (TwoD.BitBLT [LAMBDA (sourceBitmap SOURCELEFT SOURCEBOTTOM destinationWindow DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION) (* Jellinek " 5-Apr-84 16:22") (PROG ((originPoint (TwoD.WorldToScreen (create POSITION XCOORD ← 0 YCOORD ← 0) destinationWindow)) sourcePoint destinationPoint destinationSize) [COND ((AND SOURCELEFT SOURCEBOTTOM) (SETQ sourcePoint (TwoD.WorldToScreen (create POSITION XCOORD ← SOURCELEFT YCOORD ← SOURCEBOTTOM) destinationWindow] [COND ((AND DESTINATIONLEFT DESTINATIONBOTTOM) (SETQ destinationPoint (TwoD.WorldToScreen (create POSITION XCOORD ← DESTINATIONLEFT YCOORD ← DESTINATIONBOTTOM) destinationWindow] [COND ((AND WIDTH HEIGHT) (SETQ destinationSize (TwoD.WorldToScreen (create POSITION XCOORD ← WIDTH YCOORD ← HEIGHT) destinationWindow)) (SETQ destinationSize (create POSITION XCOORD ←(IDIFFERENCE (fetch (POSITION XCOORD) of destinationSize) (fetch (POSITION XCOORD) of originPoint)) YCOORD ←(IDIFFERENCE (fetch (POSITION YCOORD) of destinationSize) (fetch (POSITION YCOORD) of originPoint] (BITBLT sourceBitmap (fetch (POSITION XCOORD) of sourcePoint) (fetch (POSITION YCOORD) of sourcePoint) destinationWindow (fetch (POSITION XCOORD) of destinationPoint) (fetch (POSITION YCOORD) of destinationPoint) (fetch (POSITION XCOORD) of destinationSize) (fetch (POSITION YCOORD) of destinationSize) SOURCETYPE OPERATION TEXTURE CLIPPINGREGION]) (TwoD.DrawBetween [LAMBDA (Pt1 Pt2 width operation W) (* Jellinek " 2-Apr-84 11:17") (DRAWBETWEEN (TwoD.WorldToScreen Pt1 W) (TwoD.WorldToScreen Pt2 W) width operation W]) (TwoD.DrawLine [LAMBDA (x1 y1 x2 y2 width operation W) (* edited: " 3-Apr-84 18:23") (DRAWBETWEEN (TwoD.WorldToScreen (create POSITION XCOORD ← x1 YCOORD ← y1) W) (TwoD.WorldToScreen (create POSITION XCOORD ← x2 YCOORD ← y2) W) width operation W) NIL]) (TwoD.DrawTo [LAMBDA (point width operation W) (* Jellinek " 2-Apr-84 11:27") (PROG ((newPoint (TwoD.WorldToScreen point W))) (DRAWTO (fetch (POSITION XCOORD) of newPoint) (fetch (POSITION YCOORD) of newPoint) width operation W]) (TwoD.Init [LAMBDA (W) (* Jellinek " 4-Apr-84 12:22") (CLEARW W) (PUTWINDOWPROP W (QUOTE Vxr) (GETWINDOWPROP W (QUOTE WIDTH))) (PUTWINDOWPROP W (QUOTE Vxl) 0) (PUTWINDOWPROP W (QUOTE Vyt) (GETWINDOWPROP W (QUOTE HEIGHT))) (PUTWINDOWPROP W (QUOTE Vyb) 0) (PUTWINDOWPROP W (QUOTE Wxr) (GETWINDOWPROP W (QUOTE WIDTH))) (PUTWINDOWPROP W (QUOTE Wxl) 0) (PUTWINDOWPROP W (QUOTE Wyt) (GETWINDOWPROP W (QUOTE HEIGHT))) (PUTWINDOWPROP W (QUOTE Wyb) 0) [COND ((GETWINDOWPROP W (QUOTE InitialClippingRegion)) (restoreDSPCLIPPINGREGION W)) (T (PUTWINDOWPROP W (QUOTE InitialClippingRegion) (DSPCLIPPINGREGION NIL W)) (PUTWINDOWPROP W (QUOTE originalHeight) (GETWINDOWPROP W (QUOTE HEIGHT))) (PUTWINDOWPROP W (QUOTE originalWidth) (GETWINDOWPROP W (QUOTE WIDTH] (TwoD.SetWindowViewport W]) (TwoD.InitViewport [LAMBDA (W) (* Jellinek " 4-Apr-84 16:38") (CLEARW W) (PUTWINDOWPROP W (QUOTE Vxr) (GETWINDOWPROP W (QUOTE WIDTH))) (PUTWINDOWPROP W (QUOTE Vxl) 0) (PUTWINDOWPROP W (QUOTE Vyt) (GETWINDOWPROP W (QUOTE HEIGHT))) (PUTWINDOWPROP W (QUOTE Vyb) 0) [COND ((GETWINDOWPROP W (QUOTE InitialClippingRegion)) (restoreDSPCLIPPINGREGION W)) (T (PUTWINDOWPROP W (QUOTE InitialClippingRegion) (DSPCLIPPINGREGION NIL W)) (PUTWINDOWPROP W (QUOTE originalHeight) (GETWINDOWPROP W (QUOTE HEIGHT))) (PUTWINDOWPROP W (QUOTE originalWidth) (GETWINDOWPROP W (QUOTE WIDTH] (TwoD.SetWindowViewport W]) (restoreDSPCLIPPINGREGION [LAMBDA (W) (* Jellinek " 4-Apr-84 12:05") (DSPCLIPPINGREGION (GETWINDOWPROP W (QUOTE InitialClippingRegion)) W]) (TwoD.MoveTo [LAMBDA (Pt W) (* edited: " 2-Apr-84 18:06") (PROG ((newPoint (TwoD.WorldToScreen Pt W))) (MOVETO (fetch (POSITION XCOORD) of newPoint) (fetch (POSITION YCOORD) of newPoint) W]) (TwoD.PlotAt [LAMBDA (Pt glyph W) (* Jellinek " 2-Apr-84 11:23") (PROG ((newPoint (TwoD.WorldToScreen Pt W)) widthGlyph heightGlyph newX newY) (SETQ newX (fetch (POSITION XCOORD) of newPoint)) (SETQ newY (fetch (POSITION YCOORD) of newPoint)) (SETQ widthGlyph (BITMAPWIDTH glyph)) (SETQ heightGlyph (BITMAPHEIGHT glyph)) (BITBLT glyph 0 0 W (IDIFFERENCE newX (IQUOTIENT widthGlyph 2)) (IDIFFERENCE newY (IQUOTIENT heightGlyph 2)) widthGlyph heightGlyph (QUOTE INPUT) (QUOTE REPLACE]) (TwoD.RelDrawTo [LAMBDA (deltaX deltaY width operation W color) (* Jellinek " 2-Apr-84 11:31") (PROG ((vector (TwoD.WorldToScreen (create POSITION XCOORD ← deltaX YCOORD ← deltaY) W))) (RELDRAWTO (fetch (POSITION XCOORD) of vector) (fetch (POSITION YCOORD) of vector) width operation W color]) (TwoD.Reshapefn [LAMBDA (window) (* Jellinek " 4-Apr-84 17:55") (PUTWINDOWPROP window (QUOTE InitialClippingRegion) (DSPCLIPPINGREGION NIL window)) (PUTWINDOWPROP window (QUOTE originalHeight) (GETWINDOWPROP window (QUOTE HEIGHT))) (PUTWINDOWPROP window (QUOTE originalWidth) (GETWINDOWPROP window (QUOTE WIDTH]) (TwoD.SetViewport [LAMBDA (Xmin Ymin Xmax Ymax window) (* Jellinek " 4-Apr-84 15:20") (PUTWINDOWPROP window (QUOTE Vxl) Xmin) (PUTWINDOWPROP window (QUOTE Vxr) Xmax) (PUTWINDOWPROP window (QUOTE Vyb) Ymin) (PUTWINDOWPROP window (QUOTE Vyt) Ymax) (TwoD.SetWindowViewport window]) (TwoD.SetWindowViewport [LAMBDA (window) (* Jellinek " 4-Apr-84 15:23") (PROG ((Vxr (GETWINDOWPROP window (QUOTE Vxr))) (Vxl (GETWINDOWPROP window (QUOTE Vxl))) (Vyt (GETWINDOWPROP window (QUOTE Vyt))) (Vyb (GETWINDOWPROP window (QUOTE Vyb))) (Wxr (GETWINDOWPROP window (QUOTE Wxr))) (Wxl (GETWINDOWPROP window (QUOTE Wxl))) (Wyt (GETWINDOWPROP window (QUOTE Wyt))) (Wyb (GETWINDOWPROP window (QUOTE Wyb))) WVxm WVxa WVym WVya) (DSPCLIPPINGREGION (GETWINDOWPROP window (QUOTE InitialClippingRegion)) window) (SETQ WVxm (FQUOTIENT (FDIFFERENCE Vxr Vxl) (FDIFFERENCE Wxr Wxl))) (SETQ WVxa (FDIFFERENCE Vxl (FTIMES Wxl WVxm))) (SETQ WVym (FQUOTIENT (FDIFFERENCE Vyt Vyb) (FDIFFERENCE Wyt Wyb))) (SETQ WVya (FDIFFERENCE Vyb (FTIMES Wyb WVym))) (PUTWINDOWPROP window (QUOTE WVxm) WVxm) (PUTWINDOWPROP window (QUOTE WVxa) WVxa) (PUTWINDOWPROP window (QUOTE WVym) WVym) (PUTWINDOWPROP window (QUOTE WVya) WVya) (DSPCLIPPINGREGION (CREATEREGION (FIX Vxl) (FIX Vyb) (FIX (IDIFFERENCE Vxr Vxl)) (FIX (IDIFFERENCE Vyt Vyb))) window]) (TwoD.SetWorld [LAMBDA (Xmin Ymin Xmax Ymax window) (* edited: " 3-Apr-84 17:23") (PUTWINDOWPROP window (QUOTE Wxl) Xmin) (PUTWINDOWPROP window (QUOTE Wxr) Xmax) (PUTWINDOWPROP window (QUOTE Wyb) Ymin) (PUTWINDOWPROP window (QUOTE Wyt) Ymax) (TwoD.SetWindowViewport window]) (TwoD.WorldToScreen [LAMBDA (Pt W) (* edited: " 3-Apr-84 18:00") (create POSITION XCOORD ←(FPLUS (GETWINDOWPROP W (QUOTE WVxa)) (FTIMES (GETWINDOWPROP W (QUOTE WVxm)) (fetch (POSITION XCOORD) of Pt))) YCOORD ←(FPLUS (GETWINDOWPROP W (QUOTE WVya)) (FTIMES (GETWINDOWPROP W (QUOTE WVym)) (fetch (POSITION YCOORD) of Pt]) (fracOfHeight [LAMBDA (fraction window) (* Jellinek " 4-Apr-84 11:38") (FTIMES fraction (GETWINDOWPROP window (QUOTE originalHeight]) (fracOfWidth [LAMBDA (fraction window) (* Jellinek " 4-Apr-84 11:37") (FTIMES fraction (GETWINDOWPROP window (QUOTE originalWidth]) ) (DECLARE: DONTCOPY (FILEMAP (NIL (550 9774 (TwoD.BitBLT 560 . 2482) (TwoD.DrawBetween 2484 . 2706) (TwoD.DrawLine 2708 . 3077) (TwoD.DrawTo 3079 . 3385) (TwoD.Init 3387 . 4338) (TwoD.InitViewport 4340 . 5074) ( restoreDSPCLIPPINGREGION 5076 . 5285) (TwoD.MoveTo 5287 . 5573) (TwoD.PlotAt 5575 . 6196) ( TwoD.RelDrawTo 6198 . 6599) (TwoD.Reshapefn 6601 . 6992) (TwoD.SetViewport 6994 . 7348) ( TwoD.SetWindowViewport 7350 . 8624) (TwoD.SetWorld 8626 . 8976) (TwoD.WorldToScreen 8978 . 9410) ( fracOfHeight 9412 . 9592) (fracOfWidth 9594 . 9772))))) STOP