Hi,

We are integrating Athens transformation to Roassal2/Trachel and I have reached 
an issue.

In drawing code I use something like this:
-=-=-=-
        athensCanvas pathTransform
                restoreAfter: [ 
                        athensCanvas pathTransform
                                multiplyBy: matrix; “an instance of 
AthensAffineTransform"
                        athensCanvas 
                                setPaint: color;
                                drawShape: self path.
-=-=-=-

I have a problem, that sometimes it crashes because it expects a float value (I 
understand why). I suppose I do not have to keep float values in 
AthensAffineTransform object. My suggestion is to ensure float values where it 
is expected. For example the method #loadAffineTransform could be like this:

-=-=-=-
AthensCairoMatrix>>loadAffineTransform: m
        self 
                initx: m x asFloat
                y: m y asFloat
                sx: m sx asFloat
                sy: m sy asFloat
                shx: m shx asFloat
                shy: m shy asFloat
-=-=-=-

Right now I have to do that transformation myself whenever I use Athens 
objects. I see it error prone and I do not see it obvious. 

On other hand I do not want to keep float values in my AthensAffineTransform, 
because if user do #scaleBy: 0.7 and then #scaleBy: (1/0.7) I want to get the 
same original value. Otherwise the image could change its size.

The same change could be for other methods in AthensCairoMatrix.

What do you think?
Juraj

Reply via email to