Plaster

common-lisp
(let+ (((&values x1 y1 x2 y2) (bounding-rectangle* (or (bench-pane-virtual-bounds pane) (sheet-region pane)))) ((&values x3 y3 x4 y4) (values (floor (/ (round x1 0.1d0) 10d0)) (floor (/ (round y1 0.1d0) 10d0)) (ceiling (/ (round x2 0.1d0) 10d0)) (ceiling (/ (round y2 0.1d0) 10d0)))) ((&values nat-width nat-height) (transform-distance (sheet-native-transformation pane) (- x4 x3) (- y4 y3)))) ...) --vs-- (multiple-value-bind (x1 y1 x2 y2) (bounding-rectangle* (or (bench-pane-virtual-bounds pane) (sheet-region pane))) (multiple-value-bind (x3 y3 x4 y4) (values (floor (/ (round x1 0.1d0) 10d0)) (floor (/ (round y1 0.1d0) 10d0)) (ceiling (/ (round x2 0.1d0) 10d0)) (ceiling (/ (round y2 0.1d0) 10d0))) (multiple-value-bind (nat-width nat-height) (transform-distance (sheet-native-transformation pane) (- x4 x3) (- y4 y3)) ...)))