[Development] matrix math help needed - https://bugreports.qt.io/browse/QTBUG-84441

Edward Welbourne edward.welbourne at qt.io
Wed May 27 16:08:17 CEST 2020

Matthew Woehlke (26 May 2020 18:15) wrote:
>>> The documentation is not clear if the scale, rotate, etc. methods of
>>> QTransform apply *before* or *after* whatever the QTransform is already
>>> doing. The bug report indicates that they are applied *first*.
>>> Given the potential for breaking existing code which expects the current
>>> behavior, my inclination would be to clarify the documentation to
>>> clearly state the existing behavior.

On 27/05/2020 04.34, Edward Welbourne wrote:
>> Yes, the docs do need updated; they do correctly say what QTransform does

Matthew Woehlke (27 May 2020 15:58)
> Really? Where?

In the example code it includes.  Not that I'm saying this is a good way
to convey what's happening, but it did tell me everything I needed to
know to work out what QTransform does.

> Here is, for example, the documentation of QTransform::scale:
>   Scales the coordinate system by sx horizontally and sy vertically,
>   and returns a reference to the matrix.
> *Nothing* there clearly states, at least to my reading, whether the
> "new" transform happens *before* or *after* any existing transforms that
> the QTransform is already doing.

Indeed, although the class comment does say things from which it can be
worked out - though I'm not sure every reader can be expected to.

> IMO, changing this to clarify that would help significantly.

No disagreement here, as I said (and you quoted):

>> Yes, the docs do need updated;


More information about the Development mailing list