anchor.diff:  ;;;   Created: 1998-12-02 19:26
   ;;;    Author: Gilbert Baumann <unk6@rz.uni-karlsruhe.de>
   ;;;   License: LGPL (See file COPYING for details).
  +;;;       $Id: regions.lisp,v 1.8 2001-01-21 12:01:55 cvs Exp $
   ;;; --------------------------------------------------------------------------------------
   ;;;  (c) copyright 1998,1999 by Gilbert Baumann
   
  
positive.code: ;;; License along with this library; if not, write to the 
  ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
  ;;; Boston, MA  02111-1307  USA.
  
  ;;; ---- TODO ----------------------------------------------------------------------------
  
  
negative.code: 
  (defmethod transform-region (tr (self standard-rectangle-set))
    (cond ((rectilinear-transformation-p tr)
           ;; When we have a rectilinear transformation, the result will
           ;; be another rectangle set; we simply can transform each X
           ;; and Y coordinate individually.
           (make-standard-rectangle-set
  	  (mapcar (lambda (band)
                      ;; band = (<y> <x1> <x2> .. <xn>)
                      (cons (nth-value 1 (transform-position tr 0 (car band)))
                            (mapcar (lambda (x)
                                      (nth-value 0 (transform-position tr x 0)))
                                    (cdr band))))
                    (standard-rectangle-set-bands self))))
          (t
           ;; We have insufficient knowledge about the transformation,
           ;; so we have to take the union of all transformed rectangles.
           ;; Maybe there is a faster way to do this.
           (let ((res +nowhere+))
             (map-over-region-set-regions
  	    (lambda (rect)
  	      (setf res (region-union res (transform-region tr rect))))
  	    self)
             res)) ))
  
  