anchor.diff:                       :insert-default t))
     (let ((viewer (find-pane-named *application-frame* 'spectacle-pane))
           (img (read-image-file image-pathname)))
  -    (with-accessors ((image gadget-value)
  +    (with-accessors ((image image)
                        (transform-parameters transform-parameters)
                        (transform transform))
           viewer
  
positive.code: 
  (in-package :spectacle)
  
  (defclass spectacle-gadget (value-gadget)
    ((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)
                       (lock-x-and-y-scale lock-x-and-y-scale))
  
negative.code:             (rads (mod (* pi degrees (/ 180)) (* 2 pi))))
          (unless (equal (elt transform-parameters param) rads)
            (setf (elt transform-parameters param) rads
                  transform nil)
            (handle-repaint viewer (or (pane-viewport-region viewer)
                                       (sheet-region viewer))))))))
  
  (defun y-shear-callback (gadget shear)
    (declare (ignore gadget))
    (let ((viewer (find-pane-named *application-frame* 'spectacle-pane)))
      (with-accessors ((image image)
                       (transform-parameters transform-parameters)
                       (transform transform))
          viewer
        (let ((param 4))
          (unless (equal (elt transform-parameters param) shear)
            (setf (elt transform-parameters param) shear
                  transform nil)
            (handle-repaint viewer (or (pane-viewport-region viewer)
                                       (sheet-region viewer))))))))
  
  (defun x-shear-callback (gadget shear)
    (declare (ignore gadget))
    (let ((viewer (find-pane-named *application-frame* 'spectacle-pane)))
      (with-accessors ((image image)
                       (transform-parameters transform-parameters)
                       (transform transform))
          viewer
        (let ((param 5))
          (unless (equal (elt transform-parameters param) shear)
            (setf (elt transform-parameters param) shear
                  transform nil)
            (handle-repaint viewer (or (pane-viewport-region viewer)
                                       (sheet-region viewer))))))))
  
  (define-application-frame spectacle ()
    ()
    (:menu-bar menubar-command-table)
    (:panes
     (viewer (scrolling ()
               (make-pane 'spectacle-pane
                          :name 'spectacle-pane
                          :width 500
                          :incremental-redisplay t
                          :background +black+
                          :foreground +white+)))
     (lock-scale :toggle-button
                 :label "Lock X and Y Scale"
                 :value t
  