(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP") (FILECREATED "14-Sep-87 15:03:25" |{MCS:MCS:STANFORD}<LANE>DSPSCALE.;3| 49549 changes to%: (FNS \TRANSLATE.DISPLAY DSPTRANSLATE! INITSCALEDIMAGESTREAM \DRAWARC.SCALED \DRAWPOINT.SCALED \ROTATE.SCALED DRAWARC! DRAWPOINT!) (VARS DSPSCALECOMS) previous date%: "14-Sep-87 14:38:57" |{MCS:MCS:STANFORD}<LANE>DSPSCALE.;1|) (* " Copyright (c) 1985, 1986, 1987 by Stanford University. All rights reserved. ") (PRETTYCOMPRINT DSPSCALECOMS) (RPAQQ DSPSCALECOMS ((LOCALVARS . T) (* * SCALED ImageStream ImageOp Functions) (FNS INITSCALEDIMAGESTREAM OPENIMAGESTREAM.SCALED) (FNS \BACKCOLOR.SCALED \BITBLT.SCALED \BLTSHADE.SCALED \BOTTOMMARGIN.SCALED \BOUT.SCALED \CHARSET.SCALED \CHARWIDTH.SCALED \CHARWIDTHY.SCALED \CLIPPINGREGION.SCALED \CLOSEFN.SCALED \COLOR.SCALED \DRAWARC.SCALED \DRAWCIRCLE.SCALED \DRAWCURVE.SCALED \DRAWELLIPSE.SCALED \DRAWLINE.SCALED \DRAWPOINT.SCALED \DRAWPOLYGON.SCALED \FILLCIRCLE.SCALED \FILLPOLYGON.SCALED \FONT.SCALED \LEFTMARGIN.SCALED \LINEFEED.SCALED \MOVETO.SCALED \NEWPAGE.SCALED \OPERATION.SCALED \RESET.SCALED \RIGHTMARGIN.SCALED \ROTATE.SCALED \SCALE.SCALED \SCALEDBITBLT.SCALED \SPACEFACTOR.SCALED \STRINGWIDTH.SCALED \TERPRI.SCALED \TOPMARGIN.SCALED \XPOSITION.SCALED \YPOSITION.SCALED \OUTCHAR.SCALED) (* * Self Scaling DSP* Functions) (FNS CENTERPRINTINREGION! CHARWIDTH! CHARWIDTHY! CURSORPOSITION! BITBLT! BITMAPBIT! BLTSHADE! DSPBACKUP! DSPBOTTOMMARGIN! DSPCLIPPINGREGION! DRAWBETWEEN! DRAWARC! DRAWCIRCLE! DRAWCURVE! DRAWELLIPSE! DRAWLINE! DRAWPOINT! DRAWPOLYGON! DRAWTO! FILLCIRCLE! FILLPOLYGON! FONTPROP! DSPLEFTMARGIN! DSPLINEFEED! GETPOSITION! MOVETO! MOVETOUPPERLEFT! DSPRIGHTMARGIN! DSPSCALE! RELDRAWTO! RELMOVETO! SCALEDBITBLT! STRINGREGION! STRINGWIDTH! DSPSPACEFACTOR! DSPTRANSLATE! DSPTOPMARGIN! DSPUNITS! DSPXOFFSET! DSPXPOSITION! DSPYOFFSET! DSPYPOSITION!) (* * Low Level Scaling Functions) (FNS DSPSCALE.BRUSH DSPSCALE.DASHING DSPSCALE.POINTS DSPSCALE.REGION DSPSCALE.NUMBER DSPSCALE.POSITION DSPSCALE.XPOSITION DSPSCALE.YPOSITION DSPSCALE.WIDTH DSPUNSCALE.REGION DSPUNSCALE.POSITION DSPUNSCALE.NUMBER DSPUNSCALE.CHARACTER) (MACROS DSPUNSCALE.XPOSITION DSPUNSCALE.YPOSITION) (* * etc.) (FNS \TRANSLATE.DISPLAY) (DECLARE%: DONTCOPY (RECORDS SCALEDIMAGEDATA CONVERT)) [ADDVARS (IMAGESTREAMTYPES (SCALED (OPENSTREAM OPENIMAGESTREAM.SCALED] (INITVARS \SCALEDIMAGEOPS \NULLFDEV) (GLOBALVARS \SCALEDIMAGEOPS \NULLFDEV) [INITVARS (SCRATCHBRUSH '(ROUND 1 NIL)) (SCRATCHREGION (create REGION)) (SCRATCHPOSITION (create POSITION)) (SCRATCHPOINTS (to 30 collect (create POSITION] (GLOBALVARS SCRATCHBRUSH SCRATCHREGION SCRATCHPOSITION SCRATCHPOINTS) (P (MOVD? 'DSPUNITS! 'DSPUNITS) (INITSCALEDIMAGESTREAM)))) (DECLARE%: DOEVAL@COMPILE DONTCOPY (LOCALVARS . T) ) (* * SCALED ImageStream ImageOp Functions) (DEFINEQ (INITSCALEDIMAGESTREAM [LAMBDA NIL (* ; "Edited 14-Sep-87 14:33 by cdl") (DECLARE (GLOBALVARS \DISPLAYIMAGEOPS)) [if (NULL \NULLFDEV) then (SETQ \NULLFDEV (create FDEV CLOSEFILE ← (FUNCTION NILL] [with IMAGEOPS \DISPLAYIMAGEOPS (if (EQ (FUNCTION NILL) IMTRANSLATE) then (* Koto compatibility fix) (SETQ IMTRANSLATE (FUNCTION \TRANSLATE.DISPLAY] (SETQ \SCALEDIMAGEOPS (create IMAGEOPS IMAGETYPE ← 'SCALED IMCLOSEFN ← (FUNCTION \CLOSEFN.SCALED) IMXPOSITION ← (FUNCTION \XPOSITION.SCALED) IMYPOSITION ← (FUNCTION \YPOSITION.SCALED) IMFONT ← (FUNCTION \FONT.SCALED) IMLEFTMARGIN ← (FUNCTION \LEFTMARGIN.SCALED) IMRIGHTMARGIN ← (FUNCTION \RIGHTMARGIN.SCALED) IMLINEFEED ← (FUNCTION \LINEFEED.SCALED) IMDRAWLINE ← (FUNCTION \DRAWLINE.SCALED) IMDRAWCURVE ← (FUNCTION \DRAWCURVE.SCALED) IMDRAWCIRCLE ← (FUNCTION \DRAWCIRCLE.SCALED) IMFILLCIRCLE ← (FUNCTION \FILLCIRCLE.SCALED) IMFILLPOLYGON ← (FUNCTION \FILLPOLYGON.SCALED) IMBITBLT ← (FUNCTION \BITBLT.SCALED) IMBLTSHADE ← (FUNCTION \BLTSHADE.SCALED) IMMOVETO ← (FUNCTION \MOVETO.SCALED) IMSCALE ← (FUNCTION \SCALE.SCALED) IMTERPRI ← (FUNCTION \TERPRI.SCALED) IMFONTCREATE ← 'DISPLAY IMCOLOR ← (FUNCTION \COLOR.SCALED) IMBACKCOLOR ← (FUNCTION \BACKCOLOR.SCALED) IMSTRINGWIDTH ← (FUNCTION \STRINGWIDTH.SCALED) IMCHARWIDTH ← (FUNCTION \CHARWIDTH.SCALED) IMCHARWIDTHY ← (FUNCTION \CHARWIDTHY.SCALED) IMRESET ← (FUNCTION \RESET.SCALED) IMDRAWPOLYGON ← (FUNCTION \DRAWPOLYGON.SCALED) IMSCALEDBITBLT ← (FUNCTION \SCALEDBITBLT.SCALED) IMTOPMARGIN ← (FUNCTION \TOPMARGIN.SCALED) IMBOTTOMMARGIN ← (FUNCTION \BOTTOMMARGIN.SCALED) IMNEWPAGE ← (FUNCTION \NEWPAGE.SCALED) IMDRAWELLIPSE ← (FUNCTION \DRAWELLIPSE.SCALED) IMCLIPPINGREGION ← (FUNCTION \CLIPPINGREGION.SCALED) IMOPERATION ← (FUNCTION \OPERATION.SCALED) IMSPACEFACTOR ← (FUNCTION \SPACEFACTOR.SCALED) IMCHARSET ← (FUNCTION \CHARSET.SCALED) IMROTATE ← (FUNCTION \ROTATE.SCALED) IMDRAWARC ← (FUNCTION \DRAWARC.SCALED) IMDRAWPOINT ← (FUNCTION \DRAWPOINT.SCALED]) (OPENIMAGESTREAM.SCALED [LAMBDA (IMAGESTREAM OPTIONS) (* cdl "26-Jan-87 09:23") (* DECLARATIONS%: (RECORD PAIR (KEY VALUE))) (LET (STREAM SCALE) [SETQ OPTIONS (for PAIR on OPTIONS by (CDDR PAIR) when (with PAIR PAIR (SELECTQ KEY (SCALE (SETQ SCALE VALUE) NIL) T)) join (with PAIR PAIR (LIST KEY VALUE] (with STREAM (SETQ STREAM (create STREAM IMAGEDATA ← (create SCALEDIMAGEDATA IMAGESTREAM ← IMAGESTREAM) IMAGEOPS ← (create IMAGEOPS IMFONTCREATE ← (with IMAGEOPS (fetch (STREAM IMAGEOPS) of IMAGESTREAM) IMFONTCREATE) reusing \SCALEDIMAGEOPS) OUTCHARFN ← (FUNCTION \OUTCHAR.SCALED) ACCESS ← 'OUTPUT DEVICE ← \NULLFDEV)) (SETQ STRMBOUTFN (FUNCTION \BOUT.SCALED))) (if SCALE then (DSPSCALE! SCALE IMAGESTREAM)) STREAM]) ) (DEFINEQ (\BACKCOLOR.SCALED [LAMBDA (STREAM COLOR) (* cdl "26-Jan-87 09:04") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMBACKCOLOR IMAGESTREAM IMAGESTREAM COLOR]) (\BITBLT.SCALED [LAMBDA (SOURCEBITMAP SOURCELEFT SOURCEBOTTOM STREAM DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION)(* cdl "26-Jan-87 10:37") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (BITBLT SOURCEBITMAP SOURCELEFT SOURCEBOTTOM IMAGESTREAM (DSPSCALE.XPOSITION DESTINATIONLEFT IMAGESTREAM ) (DSPSCALE.YPOSITION DESTINATIONBOTTOM IMAGESTREAM) WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE (DSPSCALE.REGION CLIPPINGREGION IMAGESTREAM]) (\BLTSHADE.SCALED [LAMBDA (TEXTURE STREAM DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT OPERATION CLIPPINGREGION) (* cdl "26-Jan-87 10:05") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMBLTSHADE IMAGESTREAM TEXTURE IMAGESTREAM (DSPSCALE.XPOSITION DESTINATIONLEFT IMAGESTREAM) (DSPSCALE.YPOSITION DESTINATIONBOTTOM IMAGESTREAM) (DSPSCALE.NUMBER WIDTH IMAGESTREAM) (DSPSCALE.NUMBER HEIGHT IMAGESTREAM) OPERATION (DSPSCALE.REGION CLIPPINGREGION IMAGESTREAM]) (\BOTTOMMARGIN.SCALED [LAMBDA (STREAM YPOSITION) (* cdl "26-Jan-87 08:55") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.YPOSITION (IMAGEOP 'IMBOTTOMMARGIN IMAGESTREAM IMAGESTREAM (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION IMAGESTREAM))) IMAGESTREAM]) (\BOUT.SCALED [LAMBDA (STREAM BYTE) (* cdl "26-Jan-87 08:49") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (BOUT IMAGESTREAM BYTE]) (\CHARSET.SCALED [LAMBDA (STREAM CHARACTERSET) (* cdl "26-Jan-87 08:49") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMCHARSET IMAGESTREAM IMAGESTREAM CHARACTERSET]) (\CHARWIDTH.SCALED [LAMBDA (STREAM CHARCODE) (* cdl "26-Jan-87 09:50") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.CHARACTER (IMAGEOP 'IMCHARWIDTH IMAGESTREAM IMAGESTREAM CHARCODE) (DSPFONT NIL IMAGESTREAM) IMAGESTREAM]) (\CHARWIDTHY.SCALED [LAMBDA (STREAM CHARCODE) (* cdl "26-Jan-87 10:17") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.CHARACTER (IMAGEOP 'IMCHARWIDTHY IMAGESTREAM IMAGESTREAM CHARCODE) (DSPFONT NIL IMAGESTREAM) IMAGESTREAM]) (\CLIPPINGREGION.SCALED [LAMBDA (STREAM REGION) (* cdl "26-Jan-87 09:48") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.REGION (IMAGEOP 'IMCLIPPINGREGION IMAGESTREAM IMAGESTREAM (if REGION then (DSPSCALE.REGION REGION IMAGESTREAM))) IMAGESTREAM]) (\CLOSEFN.SCALED [LAMBDA (STREAM) (* cdl "26-Jan-87 08:49") (with STREAM STREAM (PROG1 (CLOSEF (with SCALEDIMAGEDATA IMAGEDATA IMAGESTREAM)) (SETQ IMAGEDATA NIL]) (\COLOR.SCALED [LAMBDA (STREAM COLOR) (* cdl "26-Jan-87 08:57") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMCOLOR IMAGESTREAM IMAGESTREAM COLOR]) (\DRAWARC.SCALED [LAMBDA (STREAM CENTERX CENTERY RADIUS STARTANGLE NDEGREES BRUSH DASHING) (* ; "Edited 14-Sep-87 14:30 by cdl") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWARC IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION CENTERX IMAGESTREAM) (DSPSCALE.YPOSITION CENTERY IMAGESTREAM) (DSPSCALE.NUMBER RADIUS IMAGESTREAM) STARTANGLE NDEGREES (DSPSCALE.BRUSH BRUSH IMAGESTREAM) (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\DRAWCIRCLE.SCALED [LAMBDA (STREAM CENTERX CENTERY RADIUS BRUSH DASHING) (* cdl "26-Jan-87 09:03") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWCIRCLE IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION CENTERX IMAGESTREAM) (DSPSCALE.YPOSITION CENTERY IMAGESTREAM) (DSPSCALE.NUMBER RADIUS IMAGESTREAM) (DSPSCALE.BRUSH BRUSH IMAGESTREAM) (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\DRAWCURVE.SCALED [LAMBDA (STREAM KNOTS CLOSED BRUSH DASHING) (* cdl "26-Jan-87 09:36") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWCURVE IMAGESTREAM IMAGESTREAM (DSPSCALE.POINTS KNOTS IMAGESTREAM) CLOSED (DSPSCALE.BRUSH BRUSH IMAGESTREAM) (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\DRAWELLIPSE.SCALED [LAMBDA (STREAM CENTERX CENTERY SEMIMINORRADIUS SEMIMAJORRADIUS ORIENTATION BRUSH DASHING) (* cdl "26-Jan-87 09:26") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWELLIPSE IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION CENTERX IMAGESTREAM) (DSPSCALE.YPOSITION CENTERY IMAGESTREAM) (DSPSCALE.NUMBER SEMIMINORRADIUS IMAGESTREAM) (DSPSCALE.NUMBER SEMIMAJORRADIUS IMAGESTREAM) ORIENTATION (DSPSCALE.BRUSH BRUSH IMAGESTREAM) (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\DRAWLINE.SCALED [LAMBDA (STREAM X1 Y1 X2 Y2 WIDTH OPERATION COLOR DASHING) (* cdl "26-Jan-87 09:41") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWLINE IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION X1 IMAGESTREAM) (DSPSCALE.YPOSITION Y1 IMAGESTREAM) (DSPSCALE.XPOSITION X2 IMAGESTREAM) (DSPSCALE.YPOSITION Y2 IMAGESTREAM) (DSPSCALE.WIDTH WIDTH IMAGESTREAM) OPERATION COLOR (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\DRAWPOINT.SCALED [LAMBDA (STREAM X Y BRUSH OPERATION) (* ; "Edited 14-Sep-87 14:30 by cdl") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWPOINT IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION X IMAGESTREAM) (DSPSCALE.YPOSITION Y IMAGESTREAM) (DSPSCALE.BRUSH BRUSH IMAGESTREAM) OPERATION]) (\DRAWPOLYGON.SCALED [LAMBDA (STREAM KNOTS CLOSED BRUSH DASHING) (* cdl "26-Jan-87 09:37") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWPOLYGON IMAGESTREAM IMAGESTREAM (DSPSCALE.POINTS KNOTS IMAGESTREAM) CLOSED (DSPSCALE.BRUSH BRUSH IMAGESTREAM) (DSPSCALE.DASHING DASHING IMAGESTREAM]) (\FILLCIRCLE.SCALED [LAMBDA (STREAM CENTERX CENTERY RADIUS TEXTURE) (* cdl "26-Jan-87 08:59") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMFILLCIRCLE IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION CENTERX IMAGESTREAM) (DSPSCALE.YPOSITION CENTERY IMAGESTREAM) (DSPSCALE.NUMBER RADIUS IMAGESTREAM) TEXTURE]) (\FILLPOLYGON.SCALED [LAMBDA (STREAM KNOTS TEXTURE) (* cdl "26-Jan-87 09:38") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMDRAWPOLYGON IMAGESTREAM IMAGESTREAM (DSPSCALE.POINTS KNOTS IMAGESTREAM) TEXTURE]) (\FONT.SCALED [LAMBDA (STREAM FONT) (* cdl "26-Jan-87 09:13") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMFONT IMAGESTREAM IMAGESTREAM FONT]) (\LEFTMARGIN.SCALED [LAMBDA (STREAM XPOSITION) (* cdl "26-Jan-87 08:50") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.XPOSITION (IMAGEOP 'IMLEFTMARGIN IMAGESTREAM IMAGESTREAM (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION IMAGESTREAM))) IMAGESTREAM]) (\LINEFEED.SCALED [LAMBDA (STREAM DELTAY) (* cdl "26-Jan-87 09:28") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.NUMBER (IMAGEOP 'IMLINEFEED IMAGESTREAM IMAGESTREAM (if DELTAY then (DSPSCALE.NUMBER DELTAY IMAGESTREAM))) IMAGESTREAM]) (\MOVETO.SCALED [LAMBDA (STREAM X Y) (* cdl "26-Jan-87 09:30") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMMOVETO IMAGESTREAM IMAGESTREAM (DSPSCALE.XPOSITION X IMAGESTREAM) (DSPSCALE.YPOSITION Y IMAGESTREAM]) (\NEWPAGE.SCALED [LAMBDA (STREAM) (* cdl "26-Jan-87 09:10") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMNEWPAGE IMAGESTREAM IMAGESTREAM]) (\OPERATION.SCALED [LAMBDA (STREAM OPERATION) (* cdl "26-Jan-87 08:50") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMOPERATION IMAGESTREAM IMAGESTREAM OPERATION]) (\RESET.SCALED [LAMBDA (STREAM) (* cdl "26-Jan-87 09:09") (with STREAM STREAM (SETQ CHARPOSITION 0) (with SCALEDIMAGEDATA IMAGEDATA (IMAGEOP 'IMRESET IMAGESTREAM IMAGESTREAM]) (\RIGHTMARGIN.SCALED [LAMBDA (STREAM XPOSITION) (* cdl "26-Jan-87 08:50") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.XPOSITION (IMAGEOP 'IMRIGHTMARGIN IMAGESTREAM IMAGESTREAM (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION IMAGESTREAM))) IMAGESTREAM]) (\ROTATE.SCALED [LAMBDA (STREAM ROTATION) (* ; "Edited 14-Sep-87 14:22 by cdl") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (IMAGEOP 'IMROTATE IMAGESTREAM IMAGESTREAM ROTATION]) (\SCALE.SCALED [LAMBDA (STREAM SCALE) (* cdl "26-Jan-87 09:34") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (if SCALE then (DSPSCALE! SCALE IMAGESTREAM) else (IMAGEOP 'IMSCALE IMAGESTREAM IMAGESTREAM]) (\SCALEDBITBLT.SCALED [LAMBDA (SOURCEBITMAP SOURCELEFT SOURCEBOTTOM STREAM DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION SCALE) (* cdl "26-Jan-87 10:38") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (SCALEDBITBLT SOURCEBITMAP SOURCELEFT SOURCEBOTTOM IMAGESTREAM (DSPSCALE.XPOSITION DESTINATIONLEFT IMAGESTREAM) (DSPSCALE.YPOSITION DESTINATIONBOTTOM IMAGESTREAM) WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE (DSPSCALE.REGION CLIPPINGREGION IMAGESTREAM) SCALE]) (\SPACEFACTOR.SCALED [LAMBDA (STREAM FACTOR) (* cdl "26-Jan-87 09:46") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.NUMBER (IMAGEOP 'IMSPACEFACTOR IMAGESTREAM IMAGESTREAM (if FACTOR then (DSPSCALE.NUMBER FACTOR IMAGESTREAM))) IMAGESTREAM]) (\STRINGWIDTH.SCALED [LAMBDA (STREAM STRING RDTBL) (* cdl "26-Jan-87 09:45") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.CHARACTER (IMAGEOP 'IMSTRINGWIDTH IMAGESTREAM IMAGESTREAM STRING RDTBL) (DSPFONT NIL IMAGESTREAM) IMAGESTREAM]) (\TERPRI.SCALED [LAMBDA (STREAM) (* cdl "26-Jan-87 09:06") (with STREAM STREAM (SETQ CHARPOSITION 0) (with SCALEDIMAGEDATA IMAGEDATA (IMAGEOP 'IMTERPRI IMAGESTREAM IMAGESTREAM]) (\TOPMARGIN.SCALED [LAMBDA (STREAM YPOSITION) (* cdl "26-Jan-87 08:54") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.YPOSITION (IMAGEOP 'IMTOPMARGIN IMAGESTREAM IMAGESTREAM (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION IMAGESTREAM))) IMAGESTREAM]) (\XPOSITION.SCALED [LAMBDA (STREAM XPOSITION) (* cdl "26-Jan-87 08:51") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.XPOSITION (IMAGEOP 'IMXPOSITION IMAGESTREAM IMAGESTREAM (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION IMAGESTREAM))) IMAGESTREAM]) (\YPOSITION.SCALED [LAMBDA (STREAM YPOSITION) (* cdl "26-Jan-87 08:51") (with SCALEDIMAGEDATA (with STREAM STREAM IMAGEDATA) (DSPUNSCALE.YPOSITION (IMAGEOP 'IMYPOSITION IMAGESTREAM IMAGESTREAM (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION IMAGESTREAM))) IMAGESTREAM]) (\OUTCHAR.SCALED [LAMBDA (STREAM CHARCODE) (* cdl "26-Jan-87 10:20") [if (EQ CHARCODE (CHARCODE EOL)) then (with STREAM STREAM (SETQ CHARPOSITION 0)) else (freplace CHARPOSITION of STREAM with (\LOLOC (\ADDBASE (ffetch CHARPOSITION of STREAM) 1] (BOUT STREAM CHARCODE]) ) (* * Self Scaling DSP* Functions) (DEFINEQ (CENTERPRINTINREGION! [LAMBDA (EXP REGION STREAM) (* cdl "29-Jul-85 12:09") (CENTERPRINTINREGION EXP (if REGION then (DSPSCALE.REGION REGION STREAM)) STREAM]) (CHARWIDTH! [LAMBDA (CHARCODE FONT STREAM) (* cdl "29-Jul-85 09:11") (DSPUNSCALE.CHARACTER (CHARWIDTH CHARCODE FONT) FONT STREAM]) (CHARWIDTHY! [LAMBDA (CHARCODE FONT STREAM) (* cdl "29-Jul-85 09:12") (DSPUNSCALE.CHARACTER (CHARWIDTHY CHARCODE FONT) FONT STREAM]) (CURSORPOSITION! [LAMBDA (NEWPOSITION STREAM OLDPOSITION) (* cdl "30-Oct-85 08:15") (DSPUNSCALE.POSITION (CURSORPOSITION (if NEWPOSITION then (DSPSCALE.POSITION NEWPOSITION STREAM OLDPOSITION)) STREAM OLDPOSITION) STREAM OLDPOSITION]) (BITBLT! [LAMBDA (SOURCE SOURCELEFT SOURCEBOTTOM DESTINATION DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION)(* cdl "29-Jul-85 12:09") (BITBLT SOURCE SOURCELEFT SOURCEBOTTOM DESTINATION (DSPSCALE.XPOSITION DESTINATIONLEFT DESTINATION) (DSPSCALE.YPOSITION DESTINATIONBOTTOM DESTINATION) WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE (DSPSCALE.REGION CLIPPINGREGION DESTINATION]) (BITMAPBIT! [LAMBDA (STREAM X Y NEWVALUE) (* cdl "29-Jul-85 12:01") (BITMAPBIT STREAM (DSPSCALE.XPOSITION X STREAM) (DSPSCALE.YPOSITION Y STREAM) NEWVALUE]) (BLTSHADE! [LAMBDA (TEXTURE DESTINATION DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT OPERATION CLIPPINGREGION) (* cdl "29-Jul-85 12:02") (BLTSHADE TEXTURE DESTINATION (DSPSCALE.XPOSITION DESTINATIONLEFT DESTINATION) (DSPSCALE.YPOSITION DESTINATIONBOTTOM DESTINATION) (DSPSCALE.NUMBER WIDTH DESTINATION) (DSPSCALE.NUMBER HEIGHT DESTINATION) OPERATION (DSPSCALE.REGION CLIPPINGREGION DESTINATION]) (DSPBACKUP! [LAMBDA (WIDTH DISPLAYSTREAM) (* cdl "29-Jul-85 12:02") (DSPBACKUP (if WIDTH then (DSPSCALE.XPOSITION WIDTH DISPLAYSTREAM)) DISPLAYSTREAM]) (DSPBOTTOMMARGIN! [LAMBDA (YPOSITION STREAM) (* cdl "29-Jul-85 12:02") (DSPUNSCALE.YPOSITION (DSPBOTTOMMARGIN (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION STREAM)) STREAM) STREAM]) (DSPCLIPPINGREGION! [LAMBDA (REGION STREAM) (* cdl "29-Jul-85 08:41") (DSPUNSCALE.REGION (DSPCLIPPINGREGION (if REGION then (DSPSCALE.REGION REGION STREAM)) STREAM) STREAM]) (DRAWBETWEEN! [LAMBDA (PT1 PT2 WIDTH OPERATION STREAM COLOR DASHING) (* cdl "29-Oct-85 15:30") (DRAWBETWEEN (DSPSCALE.POSITION PT1 STREAM (CAR SCRATCHPOINTS)) (DSPSCALE.POSITION PT2 STREAM (CADR SCRATCHPOINTS)) (DSPSCALE.WIDTH WIDTH STREAM) OPERATION STREAM COLOR (DSPSCALE.DASHING DASHING STREAM]) (DRAWARC! [LAMBDA (CENTERX CENTERY RADIUS STARTANGLE NDEGREES BRUSH DASHING STREAM) (* ; "Edited 14-Sep-87 14:34 by cdl") (DRAWARC (DSPSCALE.XPOSITION CENTERX STREAM) (DSPSCALE.YPOSITION CENTERY STREAM) (DSPSCALE.NUMBER RADIUS STREAM) STARTANGLE NDEGREES (DSPSCALE.BRUSH BRUSH STREAM) (DSPSCALE.DASHING DASHING STREAM) STREAM]) (DRAWCIRCLE! [LAMBDA (CENTERX CENTERY RADIUS BRUSH DASHING STREAM) (* cdl "29-Jul-85 12:03") (DRAWCIRCLE (DSPSCALE.XPOSITION CENTERX STREAM) (DSPSCALE.YPOSITION CENTERY STREAM) (DSPSCALE.NUMBER RADIUS STREAM) (DSPSCALE.BRUSH BRUSH STREAM) (DSPSCALE.DASHING DASHING STREAM) STREAM]) (DRAWCURVE! [LAMBDA (KNOTS CLOSED BRUSH DASHING STREAM) (* cdl "29-Jul-85 10:04") (DRAWCURVE (DSPSCALE.POINTS KNOTS STREAM) CLOSED (DSPSCALE.BRUSH BRUSH STREAM) (DSPSCALE.DASHING DASHING STREAM) STREAM]) (DRAWELLIPSE! [LAMBDA (CENTERX CENTERY SEMIMINORRADIUS SEMIMAJORRADIUS ORIENTATION BRUSH DASHING STREAM) (* cdl "29-Jul-85 12:03") (DRAWELLIPSE (DSPSCALE.XPOSITION CENTERX STREAM) (DSPSCALE.YPOSITION CENTERY STREAM) (DSPSCALE.NUMBER SEMIMINORRADIUS STREAM) (DSPSCALE.NUMBER SEMIMAJORRADIUS STREAM) ORIENTATION (DSPSCALE.BRUSH BRUSH STREAM) (DSPSCALE.DASHING DASHING STREAM) STREAM]) (DRAWLINE! [LAMBDA (X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR DASHING) (* cdl "29-Oct-85 15:28") (DRAWLINE (DSPSCALE.XPOSITION X1 STREAM) (DSPSCALE.YPOSITION Y1 STREAM) (DSPSCALE.XPOSITION X2 STREAM) (DSPSCALE.YPOSITION Y2 STREAM) (DSPSCALE.WIDTH WIDTH STREAM) OPERATION STREAM COLOR (DSPSCALE.DASHING DASHING STREAM]) (DRAWPOINT! [LAMBDA (X Y BRUSH STREAM OPERATION) (* ; "Edited 14-Sep-87 14:36 by cdl") (DRAWPOINT (DSPSCALE.XPOSITION X STREAM) (DSPSCALE.YPOSITION Y STREAM) (DSPSCALE.BRUSH BRUSH STREAM) STREAM OPERATION]) (DRAWPOLYGON! [LAMBDA (POINTS CLOSED BRUSH DASHING STREAM) (* cdl "29-Jul-85 10:05") (DRAWPOLYGON (DSPSCALE.POINTS POINTS STREAM) CLOSED (DSPSCALE.BRUSH BRUSH STREAM) (DSPSCALE.DASHING DASHING STREAM) STREAM]) (DRAWTO! [LAMBDA (X Y WIDTH OPERATION STREAM COLOR DASHING) (* cdl "29-Oct-85 15:31") (DRAWTO (DSPSCALE.XPOSITION X STREAM) (DSPSCALE.YPOSITION Y STREAM) (DSPSCALE.WIDTH WIDTH STREAM) OPERATION STREAM COLOR (DSPSCALE.DASHING DASHING STREAM]) (FILLCIRCLE! [LAMBDA (CENTERX CENTERY RADIUS TEXTURE STREAM) (* cdl " 7-Feb-86 15:02") (FILLCIRCLE (DSPSCALE.XPOSITION CENTERX STREAM) (DSPSCALE.YPOSITION CENTERY STREAM) (DSPSCALE.NUMBER RADIUS STREAM) TEXTURE STREAM]) (FILLPOLYGON! [LAMBDA (KNOTS TEXTURE STREAM) (* cdl "30-Oct-85 07:44") (FILLPOLYGON (DSPSCALE.POINTS KNOTS STREAM) TEXTURE STREAM]) (FONTPROP! [LAMBDA (FONT PROP STREAM) (* cdl "23-Apr-86 08:48") (SELECTQ PROP ((ASCENT DESCENT HEIGHT) (DSPUNSCALE.CHARACTER (FONTPROP FONT PROP) FONT STREAM)) (FONTPROP FONT PROP]) (DSPLEFTMARGIN! [LAMBDA (XPOSITION STREAM) (* cdl "29-Jul-85 12:05") (DSPUNSCALE.XPOSITION (DSPLEFTMARGIN (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION STREAM)) STREAM) STREAM]) (DSPLINEFEED! [LAMBDA (DELTAY STREAM) (* cdl "29-Jul-85 11:11") (DSPUNSCALE.NUMBER (DSPLINEFEED (if DELTAY then (DSPSCALE.NUMBER DELTAY STREAM)) STREAM) STREAM]) (GETPOSITION! [LAMBDA (STREAM CURSOR) (* cdl "30-Oct-85 08:03") (DSPUNSCALE.POSITION (GETPOSITION STREAM CURSOR) STREAM]) (MOVETO! [LAMBDA (X Y STREAM) (* cdl "29-Jul-85 12:06") (MOVETO (DSPSCALE.XPOSITION X STREAM) (DSPSCALE.YPOSITION Y STREAM) STREAM]) (MOVETOUPPERLEFT! [LAMBDA (WINDOW REGION) (* cdl "29-Jul-85 12:10") (MOVETOUPPERLEFT WINDOW (if REGION then (DSPSCALE.REGION REGION WINDOW]) (DSPRIGHTMARGIN! [LAMBDA (XPOSITION STREAM) (* cdl "16-Oct-85 16:11") (DSPUNSCALE.XPOSITION (DSPRIGHTMARGIN (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION STREAM)) STREAM) STREAM]) (DSPSCALE! [LAMBDA (SCALE STREAM) (* cdl "23-Apr-86 09:40") (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) (PROG1 (OR (STREAMPROP STREAM 'SCALE) (DSPSCALE NIL STREAM)) (if SCALE then (STREAMPROP STREAM 'SCALE SCALE) (STREAMPROP STREAM 'SCALED T) (LET [(RATIO (STREAMPROP STREAM 'RATIO] [if (NULL RATIO) then (STREAMPROP STREAM 'RATIO (SETQ RATIO (create CONVERT SOURCE ← 1] (with CONVERT RATIO (SETQ DESTINATION (TIMES SCALE (DSPSCALE NIL STREAM]) (RELDRAWTO! [LAMBDA (DX DY WIDTH OPERATION STREAM COLOR DASHING) (* cdl "29-Oct-85 15:31") (RELDRAWTO (DSPSCALE.NUMBER DX STREAM) (DSPSCALE.NUMBER DY STREAM) (DSPSCALE.WIDTH WIDTH STREAM) OPERATION STREAM COLOR (DSPSCALE.DASHING DASHING STREAM]) (RELMOVETO! [LAMBDA (DX DY STREAM) (* cdl "30-Oct-85 07:43") (RELMOVETO (DSPSCALE.NUMBER DX STREAM) (DSPSCALE.NUMBER DY STREAM) STREAM]) (SCALEDBITBLT! [LAMBDA (SOURCE SOURCELEFT SOURCEBOTTOM DESTINATION DESTINATIONLEFT DESTINATIONBOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION SCALE) (* cdl "29-Jul-85 12:13") (SCALEDBITBLT SOURCELEFT SOURCEBOTTOM DESTINATION (DSPSCALE.XPOSITION DESTINATIONLEFT DESTINATION ) (DSPSCALE.YPOSITION DESTINATIONBOTTOM DESTINATION) WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE (DSPSCALE.REGION CLIPPINGREGION DESTINATION) SCALE]) (STRINGREGION! [LAMBDA (STR STREAM PRIN2FLG RDTBL) (* cdl " 2-May-86 14:05") (LET ((REGION (STRINGREGION STR STREAM PRIN2FLG RDTBL))) (DSPUNSCALE.REGION REGION STREAM REGION]) (STRINGWIDTH! [LAMBDA (STR FONT FLG RDTBL STREAM) (* cdl "29-Jul-85 09:12") (DSPUNSCALE.CHARACTER (STRINGWIDTH STR FONT FLG RDTBL) FONT STREAM]) (DSPSPACEFACTOR! [LAMBDA (FACTOR STREAM) (* cdl "29-Jul-85 11:12") (DSPUNSCALE.NUMBER (DSPSPACEFACTOR (if FACTOR then (DSPSCALE.NUMBER FACTOR STREAM)) STREAM) STREAM]) (DSPTRANSLATE! [LAMBDA (Tx.OR.POSITION Ty.OR.STREAM STREAM.OR.NIL) (* ; "Edited 14-Sep-87 15:02 by cdl") (if (POSITIONP Tx.OR.POSITION) then (* Koto Compatibility) (STREAMPROP (GETSTREAM Ty.OR.STREAM) 'TRANSLATE Tx.OR.POSITION) else (STREAMPROP (GETSTREAM STREAM.OR.NIL 'TRANSLATE (CREATEPOSITION Tx.OR.POSITION Ty.OR.STREAM]) (DSPTOPMARGIN! [LAMBDA (YPOSITION STREAM) (* cdl "29-Jul-85 12:00") (DSPUNSCALE.YPOSITION (DSPTOPMARGIN (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION STREAM)) STREAM) STREAM]) (DSPUNITS! [LAMBDA (UNITS STREAM) (* cdl "23-Apr-86 09:40") (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) (PROG1 (STREAMPROP STREAM 'UNITS) (if UNITS then (STREAMPROP STREAM 'UNITS UNITS) (STREAMPROP STREAM 'SCALED T) (LET [(RATIO (STREAMPROP STREAM 'RATIO] [if (NULL RATIO) then (STREAMPROP STREAM 'RATIO (SETQ RATIO (create CONVERT DESTINATION ← 1] (with CONVERT RATIO (SETQ SOURCE UNITS]) (DSPXOFFSET! [LAMBDA (XOFFSET DISPLAYSTREAM) (* cdl "29-Jul-85 11:12") (DSPUNSCALE.NUMBER (DSPXOFFSET (if XOFFSET then (DSPSCALE.NUMBER XOFFSET DISPLAYSTREAM)) DISPLAYSTREAM) DISPLAYSTREAM]) (DSPXPOSITION! [LAMBDA (XPOSITION STREAM) (* cdl "29-Jul-85 12:00") (DSPUNSCALE.XPOSITION (DSPXPOSITION (if XPOSITION then (DSPSCALE.XPOSITION XPOSITION STREAM)) STREAM) STREAM]) (DSPYOFFSET! [LAMBDA (YOFFSET DISPLAYSTREAM) (* cdl "29-Jul-85 11:59") (DSPUNSCALE.NUMBER (DSPYOFFSET (if YOFFSET then (DSPSCALE.NUMBER YOFFSET DISPLAYSTREAM)) DISPLAYSTREAM) DISPLAYSTREAM]) (DSPYPOSITION! [LAMBDA (YPOSITION STREAM) (* cdl "29-Jul-85 11:59") (DSPUNSCALE.YPOSITION (DSPYPOSITION (if YPOSITION then (DSPSCALE.YPOSITION YPOSITION STREAM)) STREAM) STREAM]) ) (* * Low Level Scaling Functions) (DEFINEQ (DSPSCALE.BRUSH [LAMBDA (BRUSH STREAM) (* cdl "29-Oct-85 15:29") (if (NULL BRUSH) then (create BRUSH BRUSHSHAPE ← 'ROUND BRUSHSIZE ← (DSPSCALE.WIDTH 1 STREAM) smashing SCRATCHBRUSH) elseif (LISTP BRUSH) then (with BRUSH BRUSH (create BRUSH BRUSHCOLOR ← BRUSHCOLOR BRUSHSHAPE ← BRUSHSHAPE BRUSHSIZE ← (DSPSCALE.WIDTH BRUSHSIZE STREAM) smashing SCRATCHBRUSH )) elseif (NUMBERP BRUSH) then (DSPSCALE.WIDTH BRUSH STREAM) else BRUSH]) (DSPSCALE.DASHING [LAMBDA (DASHING STREAM) (* cdl "29-Oct-85 15:41") (if (LISTP DASHING) then (for WIDTH in DASHING collect (DSPSCALE.WIDTH WIDTH STREAM)) elseif (NUMBERP DASHING) then (DSPSCALE.WIDTH DASHING STREAM) else DASHING]) (DSPSCALE.POINTS [LAMBDA (KNOTS STREAM) (* cdl "29-Oct-85 15:59") (bind (KNOTSLST ← SCRATCHPOINTS) for KNOT in KNOTS collect (DSPSCALE.POSITION KNOT STREAM (if KNOTSLST then (pop KNOTSLST) else (push SCRATCHPOINTS (create POSITION)) (CAR SCRATCHPOINTS]) (DSPSCALE.REGION [LAMBDA (REGION STREAM SMASH) (* cdl "28-Oct-85 09:00") (if (type? REGION REGION) then (with REGION REGION (create REGION LEFT ← (DSPSCALE.XPOSITION LEFT STREAM) BOTTOM ← (DSPSCALE.YPOSITION BOTTOM STREAM) WIDTH ← (DSPSCALE.NUMBER WIDTH STREAM) HEIGHT ← (DSPSCALE.NUMBER HEIGHT STREAM) smashing (OR SMASH SCRATCHREGION))) else REGION]) (DSPSCALE.NUMBER [LAMBDA (VALUE STREAM) (* cdl "23-Apr-86 09:10") (if (NUMBERP VALUE) then (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) (if [FLOATP (SETQ VALUE (if (GETSTREAMPROP STREAM 'SCALED) then (with CONVERT (GETSTREAMPROP STREAM 'RATIO) (QUOTIENT (TIMES VALUE DESTINATION) SOURCE)) else (TIMES (IMAGEOP 'IMSCALE STREAM STREAM) VALUE] then (FIXR VALUE) else VALUE) else VALUE]) (DSPSCALE.POSITION [LAMBDA (POSITION STREAM SMASH) (* cdl "29-Jul-85 11:57") (with POSITION POSITION (create POSITION XCOORD ← (DSPSCALE.XPOSITION XCOORD STREAM) YCOORD ← (DSPSCALE.YPOSITION YCOORD STREAM) smashing (OR SMASH SCRATCHPOSITION]) (DSPSCALE.XPOSITION [LAMBDA (VALUE STREAM) (* cdl " 1-Nov-85 08:47") (if (NUMBERP VALUE) then (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) [LET [(TRANSLATE (GETSTREAMPROP STREAM 'TRANSLATE] (if TRANSLATE then (with POSITION TRANSLATE (add VALUE XCOORD] (DSPSCALE.NUMBER VALUE STREAM) else VALUE]) (DSPSCALE.YPOSITION [LAMBDA (VALUE STREAM) (* cdl " 1-Nov-85 08:47") (if (NUMBERP VALUE) then (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) [LET [(TRANSLATE (GETSTREAMPROP STREAM 'TRANSLATE] (if TRANSLATE then (with POSITION TRANSLATE (add VALUE YCOORD] (DSPSCALE.NUMBER VALUE STREAM) else VALUE]) (DSPSCALE.WIDTH [LAMBDA (WIDTH STREAM) (* cdl "29-Oct-85 15:27") (if (ZEROP (SETQ WIDTH (DSPSCALE.NUMBER WIDTH STREAM))) then 1 else WIDTH]) (DSPUNSCALE.REGION [LAMBDA (REGION STREAM SMASH) (* cdl " 2-May-86 14:04") (if (type? REGION REGION) then (with REGION REGION (create REGION LEFT ← (DSPUNSCALE.XPOSITION LEFT STREAM) BOTTOM ← (DSPUNSCALE.YPOSITION BOTTOM STREAM) WIDTH ← (DSPUNSCALE.NUMBER WIDTH STREAM) HEIGHT ← (DSPUNSCALE.NUMBER HEIGHT STREAM) smashing (OR SMASH SCRATCHREGION))) else REGION]) (DSPUNSCALE.POSITION [LAMBDA (POSITION STREAM SMASH) (* cdl "17-Sep-85 14:21") (with POSITION POSITION (create POSITION XCOORD ← (DSPUNSCALE.XPOSITION XCOORD STREAM) YCOORD ← (DSPUNSCALE.YPOSITION YCOORD STREAM) smashing (OR SMASH SCRATCHPOSITION]) (DSPUNSCALE.NUMBER [LAMBDA (VALUE STREAM OFFSET) (* cdl "27-Jan-87 11:32") (if (NUMBERP VALUE) then (if (NOT (type? STREAM STREAM)) then (SETQ STREAM (GETSTREAM STREAM))) [SETQ VALUE (if (GETSTREAMPROP STREAM 'SCALED) then (with CONVERT (GETSTREAMPROP STREAM 'RATIO) (QUOTIENT (TIMES VALUE SOURCE) DESTINATION)) else (QUOTIENT VALUE (IMAGEOP 'IMSCALE STREAM STREAM] [if OFFSET then (LET [(TRANSLATE (GETSTREAMPROP STREAM 'TRANSLATE] (if TRANSLATE then (with POSITION TRANSLATE (SELECTQ OFFSET (X (SETQ VALUE (DIFFERENCE VALUE XCOORD))) (Y (SETQ VALUE (DIFFERENCE VALUE YCOORD))) NIL] (if (FLOATP VALUE) then (FIXR VALUE) else VALUE) else VALUE]) (DSPUNSCALE.CHARACTER [LAMBDA (WIDTH FONT STREAM) (* cdl "23-Apr-86 09:11") (LET (CONVERT VALUE) (if (NUMBERP WIDTH) then (if [FLOATP (SETQ VALUE (if (AND STREAM (OR (type? STREAM STREAM) (SETQ STREAM (GETSTREAM STREAM))) (GETSTREAMPROP STREAM 'SCALED)) then (with CONVERT (GETSTREAMPROP STREAM 'RATIO) (QUOTIENT (TIMES WIDTH SOURCE) DESTINATION)) else (QUOTIENT WIDTH (OR (with FONTDESCRIPTOR FONT FONTSCALE) (IMAGEOP 'IMSCALE STREAM STREAM] then (FIXR VALUE) else VALUE) else WIDTH]) ) (DECLARE%: EVAL@COMPILE [PUTPROPS DSPUNSCALE.XPOSITION MACRO ((VALUE STREAM) (DSPUNSCALE.NUMBER VALUE STREAM 'X] [PUTPROPS DSPUNSCALE.YPOSITION MACRO ((VALUE STREAM) (DSPUNSCALE.NUMBER VALUE STREAM 'Y] ) (* * etc.) (DEFINEQ (\TRANSLATE.DISPLAY [LAMBDA (STREAM Tx Ty) (* ; "Edited 14-Sep-87 14:51 by cdl") (if (AND (POSITIONP Tx) (IMAGESTREAMTYPEP (GETSTREAM Ty) 'DISPLAY)) then (DSPTRANSLATE! Tx Ty) else (DSPTRANSLATE! (CREATEPOSITION Tx Ty) STREAM]) ) (DECLARE%: DONTCOPY (DECLARE%: EVAL@COMPILE (RECORD SCALEDIMAGEDATA (IMAGESTREAM)) (RECORD CONVERT (SOURCE . DESTINATION)) ) ) (ADDTOVAR IMAGESTREAMTYPES (SCALED (OPENSTREAM OPENIMAGESTREAM.SCALED))) (RPAQ? \SCALEDIMAGEOPS NIL) (RPAQ? \NULLFDEV NIL) (DECLARE%: DOEVAL@COMPILE DONTCOPY (GLOBALVARS \SCALEDIMAGEOPS \NULLFDEV) ) (RPAQ? SCRATCHBRUSH '(ROUND 1 NIL)) (RPAQ? SCRATCHREGION (create REGION)) (RPAQ? SCRATCHPOSITION (create POSITION)) (RPAQ? SCRATCHPOINTS (to 30 collect (create POSITION))) (DECLARE%: DOEVAL@COMPILE DONTCOPY (GLOBALVARS SCRATCHBRUSH SCRATCHREGION SCRATCHPOSITION SCRATCHPOINTS) ) (MOVD? 'DSPUNITS! 'DSPUNITS) (INITSCALEDIMAGESTREAM) (PUTPROPS DSPSCALE COPYRIGHT ("Stanford University" 1985 1986 1987)) (DECLARE%: DONTCOPY (FILEMAP (NIL (3314 8774 (INITSCALEDIMAGESTREAM 3324 . 6831) (OPENIMAGESTREAM.SCALED 6833 . 8772)) ( 8775 24646 (\BACKCOLOR.SCALED 8785 . 9031) (\BITBLT.SCALED 9033 . 9833) (\BLTSHADE.SCALED 9835 . 10583 ) (\BOTTOMMARGIN.SCALED 10585 . 11040) (\BOUT.SCALED 11042 . 11254) (\CHARSET.SCALED 11256 . 11505) ( \CHARWIDTH.SCALED 11507 . 11855) (\CHARWIDTHY.SCALED 11857 . 12207) (\CLIPPINGREGION.SCALED 12209 . 12654) (\CLOSEFN.SCALED 12656 . 12917) (\COLOR.SCALED 12919 . 13157) (\DRAWARC.SCALED 13159 . 13784) ( \DRAWCIRCLE.SCALED 13786 . 14308) (\DRAWCURVE.SCALED 14310 . 14729) (\DRAWELLIPSE.SCALED 14731 . 15453 ) (\DRAWLINE.SCALED 15455 . 16035) (\DRAWPOINT.SCALED 16037 . 16468) (\DRAWPOLYGON.SCALED 16470 . 16893) (\FILLCIRCLE.SCALED 16895 . 17327) (\FILLPOLYGON.SCALED 17329 . 17638) (\FONT.SCALED 17640 . 17875) (\LEFTMARGIN.SCALED 17877 . 18328) (\LINEFEED.SCALED 18330 . 18763) (\MOVETO.SCALED 18765 . 19093) (\NEWPAGE.SCALED 19095 . 19331) (\OPERATION.SCALED 19333 . 19583) (\RESET.SCALED 19585 . 19838) (\RIGHTMARGIN.SCALED 19840 . 20293) (\ROTATE.SCALED 20295 . 20551) (\SCALE.SCALED 20553 . 20877) ( \SCALEDBITBLT.SCALED 20879 . 21795) (\SPACEFACTOR.SCALED 21797 . 22236) (\STRINGWIDTH.SCALED 22238 . 22594) (\TERPRI.SCALED 22596 . 22851) (\TOPMARGIN.SCALED 22853 . 23302) (\XPOSITION.SCALED 23304 . 23753) (\YPOSITION.SCALED 23755 . 24204) (\OUTCHAR.SCALED 24206 . 24644)) (24687 39475 ( CENTERPRINTINREGION! 24697 . 24960) (CHARWIDTH! 24962 . 25153) (CHARWIDTHY! 25155 . 25348) ( CURSORPOSITION! 25350 . 25724) (BITBLT! 25726 . 26275) (BITMAPBIT! 26277 . 26510) (BLTSHADE! 26512 . 27048) (DSPBACKUP! 27050 . 27290) (DSPBOTTOMMARGIN! 27292 . 27629) (DSPCLIPPINGREGION! 27631 . 27960) (DRAWBETWEEN! 27962 . 28331) (DRAWARC! 28333 . 28815) (DRAWCIRCLE! 28817 . 29196) (DRAWCURVE! 29198 . 29490) (DRAWELLIPSE! 29492 . 30054) (DRAWLINE! 30056 . 30470) (DRAWPOINT! 30472 . 30764) (DRAWPOLYGON! 30766 . 31063) (DRAWTO! 31065 . 31381) (FILLCIRCLE! 31383 . 31676) (FILLPOLYGON! 31678 . 31870) ( FONTPROP! 31872 . 32157) (DSPLEFTMARGIN! 32159 . 32490) (DSPLINEFEED! 32492 . 32803) (GETPOSITION! 32805 . 32994) (MOVETO! 32996 . 33214) (MOVETOUPPERLEFT! 33216 . 33453) (DSPRIGHTMARGIN! 33455 . 33789 ) (DSPSCALE! 33791 . 34603) (RELDRAWTO! 34605 . 34923) (RELMOVETO! 34925 . 35145) (SCALEDBITBLT! 35147 . 35786) (STRINGREGION! 35788 . 36017) (STRINGWIDTH! 36019 . 36219) (DSPSPACEFACTOR! 36221 . 36541) ( DSPTRANSLATE! 36543 . 37073) (DSPTOPMARGIN! 37075 . 37403) (DSPUNITS! 37405 . 38147) (DSPXOFFSET! 38149 . 38480) (DSPXPOSITION! 38482 . 38810) (DSPYOFFSET! 38812 . 39143) (DSPYPOSITION! 39145 . 39473) ) (39516 48073 (DSPSCALE.BRUSH 39526 . 40393) (DSPSCALE.DASHING 40395 . 40746) (DSPSCALE.POINTS 40748 . 41257) (DSPSCALE.REGION 41259 . 41912) (DSPSCALE.NUMBER 41914 . 42747) (DSPSCALE.POSITION 42749 . 43157) (DSPSCALE.XPOSITION 43159 . 43676) (DSPSCALE.YPOSITION 43678 . 44195) (DSPSCALE.WIDTH 44197 . 44421) (DSPUNSCALE.REGION 44423 . 45078) (DSPUNSCALE.POSITION 45080 . 45486) (DSPUNSCALE.NUMBER 45488 . 46943) (DSPUNSCALE.CHARACTER 46945 . 48071)) (48372 48751 (\TRANSLATE.DISPLAY 48382 . 48749))))) STOP