anchor.diff:      ((image-pathname 'pathname
                        :default (user-homedir-pathname)
                        :insert-default t))
  -  (let ((viewer (find-pane-named *application-frame* 'viewer))
  +  (let ((viewer (find-pane-named *application-frame* 'spectacle-pane))
           (img (read-image-file image-pathname)))
       (with-accessors ((image gadget-value)
                        (transform-parameters transform-parameters)
  -                     (transform transform)
  -                     (pattern image-pattern))
  +                     (transform transform))
           viewer
         (reset-sliders)
         (reset-transform-parameters transform-parameters)
         (setf transform nil
  -            pattern nil
               image img)
         (com-zoom))))
   
   (define-spectacle-command (com-zoom :name t)
       ()
  -  (let ((viewer (find-pane-named *application-frame* 'viewer)))
  +  (let ((viewer (find-pane-named *application-frame* 'spectacle-pane)))
       (let ((y-scale-slider (find-pane-named *application-frame* 'y-scale))
             (x-scale-slider (find-pane-named *application-frame* 'x-scale))
             (bounding-rectangle-height (bounding-rectangle-height viewer))
             (bounding-rectangle-width (bounding-rectangle-width viewer)))
         (with-accessors ((image gadget-value)
                          (transform-parameters transform-parameters)
  -                       (transform transform)
  -                       (pattern image-pattern))
  +                       (transform transform))
             viewer
  -        (setf pattern nil)
           (when image
             (with-image-bounds (oldy oldx) image
               (let ((scale (apply #'min
  
positive.code:                                                 :data cimg))))))))
  
  (defmethod handle-repaint ((pane spectacle-pane) region)
    (declare (ignore region))
    (with-bounding-rectangle* (x1 y1 x2 y2) (sheet-region pane)
      (clim:draw-rectangle* (sheet-medium pane) x1 y1 x2 y2 :ink +background-ink+))
    (with-accessors ((image gadget-value)
                     (transform-parameters transform-parameters)
                     (transform transform)
                     (transformed-image transformed-image)
                     (pattern image-pattern))
        pane
      (when image
        (unless transform
          (destructuring-bind (y-scale x-scale y-shift x-shift y-shear x-shear rotate)
              (coerce transform-parameters 'list)
            (setf transform
                  (make-affine-transformation :y-scale y-scale
                                              :x-scale x-scale
                                              :y-shift y-shift
                                              :x-shift x-shift
                                              :y-shear y-shear
                                              :x-shear x-shear
                                              :theta rotate)
                  pattern nil)))
        (unless pattern
          (setf transformed-image (if transform
                                      (transform-image image transform)
                                      image))
          (setf pattern (opticl-image-to-climi-rgb-pattern transformed-image)))
        (with-image-bounds (image-height image-width) transformed-image
          (change-space-requirements pane :height image-height :width image-width)
          (let ((bounding-rectangle-height (bounding-rectangle-height pane))
                (bounding-rectangle-width (bounding-rectangle-width pane)))
            (clim:draw-pattern*
             pane pattern
             (/ (- bounding-rectangle-width image-width) 2)
             (/ (- bounding-rectangle-height image-height) 2)))))))
  
  (defun spectacle (&key (new-process t))
    (flet ((run ()
  
negative.code:   ((transform-parameters :accessor transform-parameters :initarg :transform-parameters)
     (transform :accessor transform :initarg :transform)
     (lock-x-and-y-scale :accessor lock-x-and-y-scale :initarg :lock-x-and-y-scale)
     (climi::value :accessor image))
    (:default-initargs :value nil
      :transform-parameters #(1d0 1d0 0d0 0d0 0d0 0d0 0d0)
      :lock-x-and-y-scale t
      :transform nil))
  
  (defmethod (setf gadget-value) :after (new-value (gadget spectacle-gadget)
                                                   &key &allow-other-keys)
    (handle-repaint gadget (or (pane-viewport-region gadget)
                               (sheet-region gadget))))
  
  (defclass spectacle-pane (spectacle-gadget application-pane) ())
  
  (defun y-scale-callback (gadget scale)
    (declare (ignore gadget))
    (let ((viewer (find-pane-named *application-frame* 'spectacle-pane)))
      (with-accessors ((image gadget-value)
                       (transform-parameters transform-parameters)
                       (transform transform)
  