/[mcclim]/mcclim/recording.lisp
ViewVC logotype

Diff of /mcclim/recording.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by strandh, Thu Mar 13 06:55:27 2003 UTC revision 1.59 by gilbert, Fri Mar 14 13:47:46 2003 UTC
# Line 458  recording stream. If it is T, *STANDARD- Line 458  recording stream. If it is T, *STANDARD-
458  (defmethod replay-output-record ((record compound-output-record) stream  (defmethod replay-output-record ((record compound-output-record) stream
459                                   &optional region (x-offset 0) (y-offset 0))                                   &optional region (x-offset 0) (y-offset 0))
460    (when (null region)    (when (null region)
461      (setq region +everywhere+))      (let ((viewport (pane-viewport stream)))
462    (map-over-output-records-overlapping-region        (cond ((not (null viewport))
463     #'replay-output-record record region x-offset y-offset               (setf region (untransform-region (sheet-delta-transformation stream viewport)
464     stream region x-offset y-offset))                                              (pane-viewport-region stream))))
465                (t
466                 (setq region +everywhere+)))))
467      (with-drawing-options (stream :clipping-region region)
468        (map-over-output-records-overlapping-region
469         #'replay-output-record record region x-offset y-offset
470         stream region x-offset y-offset)))
471    
472  (defmethod output-record-hit-detection-rectangle* ((record output-record))  (defmethod output-record-hit-detection-rectangle* ((record output-record))
473    ;; XXX DC    ;; XXX DC
# Line 828  were added." Line 834  were added."
834                                       clip-region))))))                                       clip-region))))))
835    
836  (defmethod set-medium-graphics-state :after ((state gs-clip-mixin) medium)  (defmethod set-medium-graphics-state :after ((state gs-clip-mixin) medium)
837      ;;
838      ;; This definition is kind of wrong. When output records are about to
839      ;; be replayed only a certain region of the stream should be affected.[1]
840      ;; Therefore I disabled this code, since this way only breaks the
841      ;; [not very frequent case] that the output record actually contains
842      ;; a clipping region different from +everywhere+, while having it in
843      ;; breaks redisplay of streams in just about every case.
844      ;;
845      ;; Most notably Closure is affected by this, as it does the equivalent of
846      ;; (draw-rectangle* medium 0 0 800 200 :ink +white+ :filled t)
847      ;; (draw-text* medium "Hello" 100 100)
848      ;;
849      ;; Having this code in a redisplay on the region
850      ;; (make-rectangle* 0 0 50 50) fills the drawing pane with a white
851      ;; rectangle obscuring the text.
852      ;;
853      ;; [1] it is of course debatable where this extra clipping because
854      ;; of redisplay should come from. Should replay-output-record set it
855      ;; up? Should handle-repaint do so?
856      ;;
857      ;; --GB 2003-03-14
858      #+NIL
859    (setf (medium-clipping-region medium) (graphics-state-clip state)))    (setf (medium-clipping-region medium) (graphics-state-clip state)))
860    
861  (defmethod match-output-records-1 and ((record gs-clip-mixin)  (defmethod match-output-records-1 and ((record gs-clip-mixin)
# Line 957  were added." Line 985  were added."
985          (loop for i from 0 below (length coords) by 2          (loop for i from 0 below (length coords) by 2
986                do (progn                do (progn
987                     (incf (aref coords i) dx)                     (incf (aref coords i) dx)
988                     (incf (aref coords (1+ i) dy))))))))                     (incf (aref coords (1+ i)) dy)))))))
989    
990  (defmethod match-output-records-1 and ((record coord-seq-mixin)  (defmethod match-output-records-1 and ((record coord-seq-mixin)
991                                         &key (coord-seq nil coord-seq-p))                                         &key (coord-seq nil coord-seq-p))

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.5