(FILECREATED "24-Dec-83 11:00:06" {PHYLUM}<LISP>SOURCES>VERTPATCH.;1 4905 changes to: (VARS VERTPATCHCOMS) (FNS \SLOWBLTCHAR)) (* Copyright (c) 1983 by Xerox Corporation) (PRETTYCOMPRINT VERTPATCHCOMS) (RPAQQ VERTPATCHCOMS ((FNS \SLOWBLTCHAR))) (DEFINEQ (\SLOWBLTCHAR [LAMBDA (CHARCODE DISPLAYSTREAM) (* rrb "24-Dec-83 10:56") (* case of BLTCHAR where either font is rotated or destination is a color bitmap. DISPLAYSTREAM is known to be a display stream.) (PROG (ROTATION (DD (fetch IMAGEDATA of DISPLAYSTREAM))) (SETQ ROTATION (fetch (FONTDESCRIPTOR ROTATION) of (fetch DDFONT of DD))) (RETURN (COND [(EQ 0 ROTATION) (PROG (NEWX LEFT RIGHT (CURX (ffetch DDXPOSITION of DD))) [COND ((IGREATERP (SETQ NEWX (IPLUS CURX (\DSPGETCHARWIDTH CHARCODE DD))) (ffetch DDRightMargin of DD)) (* past RIGHT margin, force eol) (\DSPPRINTCR/LF (CHARCODE EOL) DISPLAYSTREAM) (SETQ CURX (ffetch DDXPOSITION of DD)) (SETQ NEWX (IPLUS CURX (\DSPGETCHARWIDTH CHARCODE DD] (* update the x position.) (freplace DDXPOSITION of DD with NEWX) (SETQ CURX (\DSPTRANSFORMX CURX DD)) (SETQ LEFT (IMAX (ffetch DDClippingLeft of DD) CURX)) (SETQ RIGHT (IMIN (ffetch DDClippingRight of DD) (\DSPTRANSFORMX NEWX DD))) (RETURN (COND ((AND (ILESSP LEFT RIGHT) (NEQ (fetch PBTHEIGHT of (SETQ NEWX (ffetch DDPILOTBBT of DD))) 0)) (SELECTQ (fetch (BITMAP BITMAPBITSPERPIXEL) of (ffetch (\DISPLAYDATA DDDestination) of DD)) (1 (.WHILE.TOP.DS. DISPLAYSTREAM (freplace PBTDESTBIT of NEWX with LEFT) (freplace PBTWIDTH of NEWX with (IDIFFERENCE RIGHT LEFT)) (freplace PBTSOURCEBIT of NEWX with (IDIFFERENCE (IPLUS (\DSPGETCHAROFFSET CHARCODE DD) LEFT) CURX)) (\PILOTBITBLT NEWX 0))) (4 (OR (\DDHASFONT DD) (\DDSETCOLORFONT DISPLAYSTREAM)) (.WHILE.TOP.DS. DISPLAYSTREAM (freplace PBTDESTBIT of NEWX with (SETQ LEFT (LLSH LEFT 2))) (freplace PBTWIDTH of NEWX with (IDIFFERENCE (LLSH RIGHT 2) LEFT)) (freplace PBTSOURCEBIT of NEWX with (IDIFFERENCE (IPLUS (LLSH (\DSPGETCHAROFFSET CHARCODE DD) 2) LEFT) (LLSH CURX 2))) (\PILOTBITBLT NEWX 0))) (8 (OR (\DDHASFONT DD) (\DDSETCOLORFONT DISPLAYSTREAM)) (.WHILE.TOP.DS. DISPLAYSTREAM (freplace PBTDESTBIT of NEWX with (SETQ LEFT (LLSH LEFT 3))) (freplace PBTWIDTH of NEWX with (IDIFFERENCE (LLSH RIGHT 3) LEFT)) (freplace PBTSOURCEBIT of NEWX with (IDIFFERENCE (IPLUS (LLSH (\DSPGETCHAROFFSET CHARCODE DD) 3) LEFT) (LLSH CURX 3))) (\PILOTBITBLT NEWX 0))) (SHOULDNT)) T] (T (* handle rotated fonts) (PROG ((YPOS (ffetch DDYPOSITION of DD)) (HEIGHTMOVED (\DSPGETCHARWIDTH CHARCODE DD)) (FONT (ffetch DDFONT of DD))) (RETURN (COND ((EQ ROTATION 90) (* don't force CR for rotated fonts.) (\DSPYPOSITION.DISPLAY DISPLAYSTREAM (IPLUS YPOS HEIGHTMOVED)) (* update the display stream x position.) (BITBLT (fetch (FONTDESCRIPTOR CHARACTERBITMAP) of FONT) 0 (\DSPGETCHAROFFSET CHARCODE DD) DISPLAYSTREAM (ADD1 (IDIFFERENCE (ffetch DDXPOSITION of DD) (FONTASCENT FONT))) YPOS (FONTHEIGHT FONT) HEIGHTMOVED)) ((EQ ROTATION 270) (\DSPYPOSITION.DISPLAY DISPLAYSTREAM (IDIFFERENCE YPOS HEIGHTMOVED) ) (BITBLT (fetch (FONTDESCRIPTOR CHARACTERBITMAP) of FONT) 0 (\DSPGETCHAROFFSET CHARCODE DD) DISPLAYSTREAM (IDIFFERENCE (ffetch DDXPOSITION of DD) (FONTDESCENT FONT)) (ffetch DDYPOSITION of DISPLAYSTREAM) (FONTHEIGHT FONT) HEIGHTMOVED)) (T (ERROR "Not implemented to rotate by other than 0, 90 or 270"]) ) (PUTPROPS VERTPATCH COPYRIGHT ("Xerox Corporation" 1983)) (DECLARE: DONTCOPY (FILEMAP (NIL (275 4825 (\SLOWBLTCHAR 285 . 4823))))) STOP