At this point, some of the normalization works with elements (x, y), and some work with the shapes (there are explicit calls to trachelShape).
Yes. Maybe this could be split in two classes.
Why not have this behavior in the corresponding classes (element and shape)? In this way, for example, a text shape can provide a normalization for fonts as well.
Doing a normalization imply an elements know its sibling. Doing this will make the relation between shapes and the view (i.e., the container of elements) too strong in my opinion.
Currently, the class RTMetricNormalizer is really small (and actually could be refactored to have much less code). If the functionalities would be in the shape, then code will less maintainable.
The only benefit I see, is that you are specifying the group of all elements only once.
Code is also much simpler!
And I can choose the precise moment when to do the normalization. If shapes will be responsible for the normalization, when do you specify a normalization should be done at a given moment (i.e., when all the elements have been added) ?
Alexandre
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev