bug in transformations
Paul Werkowski
pw at snoopy.qozzy.com
Mon Dec 14 20:11:29 UTC 2020
I am working on getting McCLIM working on Lispworks7 on Windows 10. All
is going well and I will have a few patches to contribute soon.
I do have 32 bit Lispworks Professional here, with CLIM2, that I have
been using for quite awhile now so I have my own code to use for testing
the port. One fairly simple plotting program put up a frame with no
complaints but appeared to show nothing on the screen. I traced the
issue to a disagreement between clim2 and McCLIM implementations in
transformation composition which caused my expected image to display way
out of the clipping region. This bit of code shows the problem...
(defun txf()
(let ((scale-x 2.35)
(scale-y 24.7)
(origin-x 38.0)
(origin-y 263.0))
(let* ((st (clim:make-scaling-transformation
scale-x (- scale-y)))
;;#<CLIM-INTERNALS::STANDARD-HAIRY-TRANSFORMATION
;; 2.35 0 0 -24.7 0.0 0.0>
(tt (clim:make-translation-transformation origin-x origin-y))
;;#<CLIM-INTERNALS::STANDARD-TRANSLATION :DX 38.0 :DY 263.0>
(ct1 (clim:compose-transformations tt st)) ; correct in
clim2 & Mcclim
;;#<CLIM-INTERNALS::STANDARD-HAIRY-TRANSFORMATION
2.35 0.0 0.0 -24.7 38.0 263.0> <<<<<
;; McCLIM gets this wrong (assuming clim2 is correct).
(ct2 (clim:compose-transformation-with-translation
(clim:make-scaling-transformation
scale-x (- scale-y)) origin-x origin-y))
;;#<CLIM-INTERNALS::STANDARD-HAIRY-TRANSFORMATION
;; 2.35 0.0 0.0 -24.7 89.299996
-6496.1> <<<<<
)
(values st tt ct1 ct2))))
Reading the clim2 spec, I think clim2 implements it correctly.
Paul
More information about the mcclim-devel
mailing list