-- TJaMImageImpl.mesa -- Last changed by Bill Paxton, March 12, 1982 8:35 am -- Last changed by Doug Wyatt, September 13, 1982 1:21 pm -- Last Edited by: Stone, March 17, 1983 7:31 pm DIRECTORY Graphics, GraphicsBasic, GraphicsOps, JaMOps, JaMInternal, JaMFnsDefs, Rope USING [ROPE], ConvertUnsafe, Real, TJaMGraphics; TJaMImageImpl: PROGRAM IMPORTS Graphics, GraphicsOps, JaMFnsDefs, JaMOps, ConvertUnsafe, Real, TJaMGraphics = { JDrawImage: PROCEDURE [frame: JaMInternal.Frame] = { Draw: PROC [dc: Graphics.Context] = { Graphics.DrawImage[dc,image] }; str: STRING _ [100]; name: Rope.ROPE; image: GraphicsBasic.ImageRef; JaMFnsDefs.PopString[str]; name _ ConvertUnsafe.ToRope[str]; image _ GraphicsOps.NewAisImage[name]; TJaMGraphics.Painter[Draw, frame]; }; JCopyScreen: PROCEDURE [frame: JaMInternal.Frame] = { Get: PROC RETURNS [CARDINAL] = { RETURN [Real.RoundC[MAX[JaMOps.PopReal[frame.opstk],0.0]]] }; y2: CARDINAL _ Get[]; x2: CARDINAL _ Get[]; y1: CARDINAL _ Get[]; x1: CARDINAL _ Get[]; Copy: PROC [dc: Graphics.Context] = { GraphicsOps.DrawBitmap[ self: dc, bitmap: GraphicsOps.ScreenBitmap[], w: x2-x1, h: y2-y1, x: x1, y: y1, xorigin: (x1+x2)/2, yorigin: (y1+y2)/2 ] }; IF x1 > x2 THEN { temp: CARDINAL _ x1; x1 _ x2; x2 _ temp }; IF y1 > y2 THEN { temp: CARDINAL _ y1; y1 _ y2; y2 _ temp }; TJaMGraphics.Painter[Copy, frame]; }; JaMOps.RegisterExplicit[JaMOps.defaultFrame,".drawimage"L,JDrawImage]; JaMOps.RegisterExplicit[JaMOps.defaultFrame,".copyscreen"L,JCopyScreen]; }... ĘĻ˜Jš@Īc‰œ2Īk œ[žœžœ<žœžœ_Īn œž œ"ŸœžœCžœžœ¸Ÿ œž œ!Ÿœžœžœžœžœžœ,žœžœžœžœ ŸœžœĪžœ žœ žœžœ žœ žœÜ˜š —…—<č