anchor.diff:      (coord-seq transform closed filled line-style border miter-limit)
     (with-transformed-positions (transform coord-seq)
       (if (or filled
  -            (not (eq (line-style-joint-shape line-style) :miter)))
  -        ;; XXX The following is for :ROUND. What about :BEVEL and :NONE?
  +            (eq (line-style-joint-shape line-style) :round))
           (loop for (x y) on coord-seq by #'cddr
              minimize x into min-x
              minimize y into min-y
  
positive.code:                        (values (/ dx norm) (/ dy norm))))))
            (let* ((x1 (first coord-seq))
                   (y1 (second coord-seq))
                   (min-x (- x1 border)) (min-y (- y1 border))
                   (max-x (+ x1 border)) (max-y (+ y1 border)))
              ;; FIXME: Remove zero-length segments
              (loop with sin-limit = (sin (* 0.5 miter-limit))
                 for (xp yp x y xn yn) on (if closed
                                              `(,@(last coord-seq 2)
                                                  ,@coord-seq
                                                  ,(first coord-seq) ,(second coord-seq))
                                              coord-seq)
                 by #'cddr
                 unless yn do (minf min-x (- x border)) (minf min-y (- y border))
                              (maxf max-x (+ x border)) (maxf max-y (+ y border))
                              (return)
                 do (multiple-value-bind (nx1 ny1) (normalize (- x xp) (- y yp))
                      (multiple-value-bind (nx2 ny2) (normalize (- x xn) (- y yn))
                        (let* ((cos-a (+ (* nx1 nx2) (* ny1 ny2)))
                               (sin-a/2 (sqrt (* 0.5 (- 1.0 cos-a)))))
                          (if (< sin-a/2 sin-limit)
                              (progn ; FIXME! This is for :ROUND, not for :BEVEL.
                                (minf min-x (- x border)) (minf min-y (- y border))
                                (maxf max-x (+ x border)) (maxf max-y (+ y border)))
                              (let ((length (/ border sin-a/2)))
                                (multiple-value-bind (dx dy)
                                    (normalize (+ nx1 nx2) (+ ny1 ny2) length)
                                  (let ((adx (abs dx)) (ady (abs dy)))
                                    (minf min-x (- x adx)) (minf min-y (- y ady))
                                    (maxf max-x (+ x adx)) (maxf max-y (+ y ady))))))))))
              (values min-x min-y max-x max-y))))))
  
  (def-grecording draw-polygon (coord-seq closed filled)
  
negative.code: ;;; to shrink it to the correct size only when the layout is complete
  ;;; by calling TREE-RECOMPUTE-EXTENT.
  ;;;
  ;;; - Computation of the bounding rectangle of lines/polygons ignores
  ;;; LINE-STYLE-CAP-SHAPE.
  ;;;
  ;;; - Rounding of coordinates.
  ;;;
  ;;; - Document carefully the interface of
  ;;; STANDARD-OUTPUT-RECORDING-STREAM.
  ;;;
  ;;; - COORD-SEQ is a sequence, not a list.
  
  ;;; Bug: (SETF OUTPUT-RECORD-POSITION) returns the record instead of
  ;;; the position. It is useful for debugging, but it is wrong.
  