I have a simple Morph structure: SlideRM(BorderedMorph) TransformMorphRM(TransformMorph) SlideInnerRM(PasteUpMorph) The Transform scale was aPoint. I got error when computing the inverse transform because Point does not understand reciprocal, see attached bug report.
A simple fix could be a new method to Point:
reciprocal " Answer a Point with coordinates that are the reciprocals of mine. " " Method was missing from release. " " 20040301 20:50:35 TRee(Squeak3.6-5429-tree07.38) "
^ x reciprocal @ y reciprocal.
--Trygve
This was posted by Trygve Reenskaug earlier today. I did only the postprocessing that is needed to bring this fix into our Bug fix archive viewer (BFAV).
We can easily include this method, there is no reason for not doing it. There is however a situation when it is erhaps better not to use Float>reciprocal. Look at WindowingTransformation>>applyInverseTo:, where we read:
transformedObject scaleBy: 1.0 / scale x @ (1.0 / scale y)
This is not the same as scale reciprocal: The expression 1.0 / scale x @ (1.0 / scale y) ensures that we obtain a point with Floats as its coordinates. Point>>reciprocal does not introduce Floats for receiver coordinates that are not already Floats. This is an issue for the implementation of a fast windowing transformation. ---------------------- Greetings, Boris
"Trygve Reenskaug" trygver@ifi.uio.no wrote: To: squeak-dev@lists.squeakfoundation.org Sent: Wednesday, March 10, 2004 10:51 AM Subject: [BUGFIX] Point>>reciprocal
I have a simple Morph structure: SlideRM(BorderedMorph) TransformMorphRM(TransformMorph) SlideInnerRM(PasteUpMorph) The Transform scale was aPoint. I got error when computing the inverse transform because Point does not understand reciprocal, see attached bug report.
A simple fix could be a new method to Point:
reciprocal " Answer a Point with coordinates that are the reciprocals of mine.
"
" Method was missing from release. " " 20040301 20:50:35 TRee(Squeak3.6-5429-tree07.38) " ^ x reciprocal @ y reciprocal.
--Trygve
--
Trygve Reenskaug mailto: trygver@ifi.uio.no Morgedalsvn. 5A http://heim.ifi.uio.no/~trygver N-0378 Oslo Tel: (+47) 22 49 57 27 Norway
squeak-dev@lists.squeakfoundation.org