(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP") (FILECREATED "29-Apr-88 11:52:52" {QV}<NOTECARDS>1.3LNEXT>PMIPATCH096.;1 4414 changes to%: (VARS PMIPATCH096COMS) (FNS NC.ScaleGraphNode)) (* " Copyright (c) 1988 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT PMIPATCH096COMS) (RPAQQ PMIPATCH096COMS ( (* ;;; "pmi 4/29/88: Now NC.ScaleGraphNode uses the DisplayFn of the ImageObj instead of calling NC.LinkIconDisplayFn, which didn't work for Deleted Link ImageObj's.") (DECLARE%: DONTCOPY (PROPS (PMIPATCH096 MAKEFILE-ENVIRONMENT) (PMIPATCH096 FILETYPE))) (FNS NC.ScaleGraphNode))) (* ;;; "pmi 4/29/88: Now NC.ScaleGraphNode uses the DisplayFn of the ImageObj instead of calling NC.LinkIconDisplayFn, which didn't work for Deleted Link ImageObj's." ) (DECLARE%: DONTCOPY (PUTPROPS PMIPATCH096 MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP")) (PUTPROPS PMIPATCH096 FILETYPE :BCOMPL) ) (DEFINEQ (NC.ScaleGraphNode [LAMBDA (GraphNode Scale XScale YScale BrowserWin) (* ; "Edited 29-Apr-88 11:52 by pmi") (* ;; "Change the position and node label according to Scale.") (* ;; "rht 3/14/86: Now smashes NODELABEL field of graph node with bitmap rather than NODELABELBITMAP field.") (* ;; "rht 3/18/86: Now returns GraphNode.") (* ;; "rht 3/21/86: Now scales position using XScale and YScale. But note that new node size still governed by Scale. This is because SCALEBITMAP only takes single scale.") (* ;; "pmi 4/29/88: Now uses the DisplayFn of the ImageObj instead of calling NC.LinkIconDisplayFn, which didn't work for Deleted Link ImageObj's.") (LET ((OldWidth (fetch (GRAPHNODE NODEWIDTH) of GraphNode)) (OldHeight (fetch (GRAPHNODE NODEHEIGHT) of GraphNode)) (OldPosition (fetch (GRAPHNODE NODEPOSITION) of GraphNode)) NewWidth NewHeight NewBitmap OldBitmap NodeLabel) [replace (GRAPHNODE NODEWIDTH) of GraphNode with (SETQ NewWidth (FIX (FTIMES Scale OldWidth] [replace (GRAPHNODE NODEHEIGHT) of GraphNode with (SETQ NewHeight (FIX (FTIMES Scale OldHeight] [replace (GRAPHNODE NODEPOSITION) of GraphNode with (create POSITION XCOORD ← (FIX (FTIMES XScale (fetch (POSITION XCOORD) of OldPosition))) YCOORD ← (FIX (FTIMES YScale (fetch (POSITION YCOORD) of OldPosition] (if (LESSP Scale NC.LeastScaleForGraphNodeShrinking) then (* ; "At this scale no need to shrink node label. Just show shaded box.") (SETQ NewBitmap (BITMAPCREATE NewWidth NewHeight)) (BLTSHADE GRAYSHADE NewBitmap NIL NIL NewWidth NewHeight) else (* ; "Shrink node label.") [if (SETQ OldBitmap (fetch (GRAPHNODE NODELABELBITMAP) of GraphNode)) else (SETQ OldBitmap (BITMAPCREATE OldWidth OldHeight)) (SETQ NodeLabel (fetch (GRAPHNODE NODELABEL) of GraphNode)) (* ; "Apply the appropriate DisplayFn to the imageobj") (if (IMAGEOBJP NodeLabel) then (APPLY* (IMAGEOBJPROP NodeLabel 'DISPLAYFN) NodeLabel (DSPCREATE OldBitmap)) else (PRIN1 NodeLabel (DSPCREATE OldBitmap] (SETQ NewBitmap (SCALEBITMAP OldBitmap Scale))) (replace (GRAPHNODE NODELABEL) of GraphNode with NewBitmap) (replace (GRAPHNODE NODELABELBITMAP) of GraphNode with NIL) GraphNode]) ) (PUTPROPS PMIPATCH096 COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1103 4331 (NC.ScaleGraphNode 1113 . 4329))))) STOP