[Development] matrix math help needed - https://bugreports.qt.io/browse/QTBUG-84441
Matthew Woehlke
mwoehlke.floss at gmail.com
Thu May 28 16:18:41 CEST 2020
On 27/05/2020 11.09, Giuseppe D'Angelo via Development wrote:
> Sure, augmenting the docs would help. But <devil's advocate> the whole
> point of the API is for its usage to be straightforward. If you do
>
>> QTransform t;
>> t.translate();
>> t.rotate();
>> t.scale();
>> auto result = t.map(foo);
>
> the "obvious" meaning should be that foo is getting first translated,
> then rotated, then scaled; not the other way around.
While that may be true, changing it now is going to break *every* user
that uses these methods to generate compound transformations... and
it'll be a silent break. I would be *very* surprised if that doesn't
generate more bug reports.
I think the *absolute best* we could do would be to add an optional
parameter specifying in what order to apply the change, defaulted to the
old value, with a macro to instead default it to the new value. Maybe we
can then, eventually, make defaulting to the old behavior deprecated
(either opt-in to the new, or explicitly specify), and eventually remove
it and make the new behavior default. But we're probably talking 2-3
release cycles.
Is it really worth it?
--
Matthew
More information about the Development
mailing list