Qt: matrix transformation broken from Context to Qmatrix

RESOLVED FIXED in mozilla1.9.2a1

Status

Core Graveyard
Widget: Qt
RESOLVED FIXED
9 years ago
a year ago

People

(Reporter: alessandro.cogliati, Assigned: alessandro.cogliati)

Tracking

unspecified
mozilla1.9.2a1
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111317 Ubuntu/8.04 (hardy) Firefox/3.0.4
Build Identifier: 

content is broken due to wrong recognizing parameters.
this might be because of wrong order of parameters in  QMatrix qctm(ctm.xx, ctm.xy, ctm.yx, ctm.yy, ctm.x0, ctm.y0);

http://mxr.mozilla.org/mozilla-central/source/widget/src/qt/nsNativeThemeQt.cpp#132



Reproducible: Always
(Assignee)

Comment 1

9 years ago
Created attachment 353406 [details] [diff] [review]
proposed fix

Comment 2

9 years ago
Comment on attachment 353406 [details] [diff] [review]
proposed fix

Are you sure this is right?

QMatrix takes
qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy

which should be as the code is written
Attachment #353406 - Flags: review-
Attachment #353406 - Flags: review- → review?(pavlov)
Comment on attachment 353406 [details] [diff] [review]
proposed fix

>-    QMatrix qctm(ctm.xx, ctm.xy, ctm.yx, ctm.yy, ctm.x0, ctm.y0);
>+    QMatrix qctm(ctm.xx, ctm.yx, ctm.xy, ctm.yy, ctm.x0, ctm.y0);

> QMatrix takes
> qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy

...and http://doc.trolltech.com/4.3/qmatrix.html#basic-matrix-operations says 
 x' = m11*x + m21*y + dx
 y' = m22*y + m12*x + dy
and http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/public/gfxMatrix.h#59 says
 x' = xx*x + xy*y + tx
 y' = yx*x + yy*y + ty
which would make xy==m21 and yx==m12 for the transformation, which is in agreement with the patch.

Updated

9 years ago
Attachment #353406 - Flags: review?(pavlov) → review+
(Assignee)

Updated

9 years ago
Keywords: checkin-needed

Updated

9 years ago
Assignee: nobody → alessandro.cogliati
http://hg.mozilla.org/mozilla-central/rev/81c2aaaf0613
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.