(defmethod sheet-native-transformation ((sheet sheet)) (compose-transformations (sheet-native-transformation (sheet-parent sheet)) (sheet-transformation sheet))) ;;;; Port specific: (defmethod sheet-native-transformation ((sheet clx-graft)) ;; region? (sheet-transformation sheet)) (defmethod sheet-native-transformation ((sheet clx-mirrored-sheet-mixin)) (let ((pntr (sheet-native-transformation (sheet-parent sheet)))) ;### What if no parent? ;; The backend would take the sheet region and transform it under ;; the sheet's transformation and the parent's native ;; transformation. It would then pick the upper left hand of the ;; bounding box as the mirror translation (X11 window ;; position). That is a translation which is already happening ;; from our mirror space to the parent's mirror space by the ;; display server. ;; ;; So we concatenate our transformation and the parent's native ;; transformation and subtract the translation the display server ;; is doing for us. (let ((display-server-translation (let ((r (sheet-region sheet))) (multiple-value-bind (x1 y1 x2 y2) (cond ((or (eq r +nowhere+) (eq r +everywhere+)) ;### should not happen?! (values 0 0 0 0)) (t (bounding-rectangle* (transform-region (compose-transformations pntr (sheet-transformation sheet)) r)))) (declare (ignore x2 y2)) (make-translation-transformation (round-to-nearest x1) (round-to-nearest y1)))))) (compose-transformations (invert-transformation display-server-translation) (compose-transformations pntr (sheet-transformation sheet))))))