anchor.diff:                 (replay-output-record record stream region))
             (setf (stream-cursor-position stream) (values cx cy)))))))
   
  -(defmethod replay-output-record ((record output-record) stream
  +(defmethod replay-output-record ((record compound-output-record) stream
   				 &optional region (x-offset 0) (y-offset 0))
     (when (null region)
       (setq region +everywhere+))
  
positive.code:   t)
  
  ;;; XXX Should this only be defined on recording streams?
  (defmethod highlight-output-record ((record basic-output-record-mixin)
  				    stream state)
    ;; FIXME!!! WITH-IDENTITY-TRANSFORMATION
    (multiple-value-bind (x1 y1 x2 y2)
        (output-record-hit-detection-rectangle* record)
      (ecase state
        (:highlight
         (draw-rectangle* (sheet-medium stream) x1 y1 x2 y2
                          :filled nil :ink +foreground-ink+))
        (:unhighlight
         (draw-rectangle* (sheet-medium stream) x1 y1 x2 y2
                          :filled nil :ink +background-ink+)))))
  
  (defclass standard-sequence-output-record (output-record-mixin)
    ((children :initform (make-array 8 :adjustable t :fill-pointer 0)
  	     :reader output-record-children)))
  
  ;;; XXX bogus for now.
  (defclass standard-tree-output-record (standard-sequence-output-record)
    (
     ))
  
  #+nil
  (defmethod* (setf output-record-position)
      (nx ny (record standard-sequence-output-record))
    (with-slots (x y) record
      (setq x nx
            y ny)))
  
  (defmethod add-output-record (child (record standard-sequence-output-record))
    (with-slots (children) record
      (vector-push-extend child children))
    (with-slots (parent) child
      (setf parent record)))
  
  (defmethod add-output-record :before (child (record output-record-mixin))
    (when (zerop (output-record-count record)) 
      (with-slots (x1 y1 x2 y2) record
        (setf (values x1 y1 x2 y2) (bounding-rectangle* child)))))
  
  (defmethod add-output-record :after (child (record output-record))
    (recompute-extent-for-new-child record child))
  
  (defmethod delete-output-record (child (record standard-sequence-output-record)
  				 &optional (errorp t))
  
negative.code:     (function (record standard-sequence-output-record)
       &optional (x-offset 0) (y-offset 0)
       &rest function-args)
    "Applies FUNCTION to all children in the order they were added."
    (declare (ignore x-offset y-offset))
    (loop with children = (output-record-children record)
       for child across children
       do (apply function child function-args)))
  
  (defmethod map-over-output-records-containing-position
      (function (record standard-sequence-output-record) x y
       &optional (x-offset 0) (y-offset 0)
       &rest function-args)
    "Applies FUNCTION to children, containing (X,Y), in the reversed
  order they were added."
    (declare (ignore x-offset y-offset))
    (loop with children = (output-record-children record)
       for i from (1- (length children)) downto 0
       for child = (aref children i)
       when (and (multiple-value-bind (min-x min-y max-x max-y)
                     (output-record-hit-detection-rectangle* child)
                   (and (<= min-x x max-x) (<= min-y y max-y)))
                 (output-record-refined-position-test child x y))
       do (apply function child function-args)))
  
  (defmethod map-over-output-records-overlapping-region
      (function (record standard-sequence-output-record) region
       &optional (x-offset 0) (y-offset 0)
       &rest function-args)
    "Applies FUNCTION to children, overlapping REGION, in the order they
  were added."
    (declare (ignore x-offset y-offset))
    (loop with children = (output-record-children record)
       for child across children
       when (region-intersects-region-p region child)
       do (apply function child function-args)))
  
  ;;; XXX bogus for now.
  (defclass standard-tree-output-record (standard-sequence-output-record)
    (
     ))
  
  ;;; 16.3.2. Graphics Displayed Output Records
  (defclass standard-displayed-output-record (basic-output-record
                                              displayed-output-record)
    ((ink :initarg :ink :reader displayed-output-record-ink)
     (initial-x1 :initarg :initial-x1)
     (initial-y1 :initarg :initial-y1))
    (:documentation "Implementation class for DISPLAYED-OUTPUT-RECORD."))
  
  (defclass standard-graphics-displayed-output-record
      (standard-displayed-output-record graphics-displayed-output-record)
    ((clip :initarg :clipping-region
           :documentation "Clipping region in user coordinates.")
     (transform :initarg :transformation)
     (line-style :initarg :line-style)
     (text-style :initarg :text-style)))
  
  (defmacro def-grecording (name (&rest args) &body body)
    (let ((method-name (intern (format nil "MEDIUM-~A*" name)))
  	(class-name (intern (format nil "~A-OUTPUT-RECORD" name)))
  	(medium (gensym "MEDIUM"))
          (border 'border)
          (class-vars `((stream :initarg :stream)
                        ,@(loop for arg in args
                             collect `(,arg
                                       :initarg ,(intern (symbol-name arg)
                                                         :keyword)))))
          (arg-list (loop for arg in args
                       nconc `(,(intern (symbol-name arg) :keyword) ,arg))))
      `(progn
         (defclass ,class-name (standard-graphics-displayed-output-record)
  	 ,class-vars)
         (defmethod initialize-instance :after ((graphic ,class-name) &rest args)
  	 (declare (ignore args))
  	 (with-slots (x1 y1 x2 y2 initial-x1 initial-y1
  		      stream ink clipping-region transform
  		      line-style text-style
  		      ,@args) graphic
  