W3C home > Mailing lists > Public > public-css-bugzilla@w3.org > February 2012

[Bug 15959] New: Use 3x2 CSSMatrix beside, or just 4x4 CSSMatrix?

From: <bugzilla@jessica.w3.org>
Date: Sat, 11 Feb 2012 21:15:12 +0000
To: public-css-bugzilla@w3.org
Message-ID: <bug-15959-5148@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15959

           Summary: Use 3x2 CSSMatrix beside, or just 4x4 CSSMatrix?
           Product: CSS
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Transforms
        AssignedTo: smfr@me.com
        ReportedBy: dschulze@adobe.com
         QAContact: public-css-bugzilla@w3.org
                CC: cmarrin@apple.com, eoconnor@apple.com, dino@apple.com,
                    dschulze@adobe.com


Dr. O. Hoffmann asked in a comment [1] if we want to use 3x2 and 4x4, or if we
always want to use 4x4 for CSSMatrix. And now that we merge CSS 2D Transforms
and CSS 3D Transforms we run into the same question.

Does it still make sense to differ between 3x2 and 4x4 in the CSS Transforms
spec, or should CSSMatrix always be a 4x4 matrix?

If we decide to use a 4x4 matrix, we can remove all comments about 3x2
matrices. It will just be necessary to describe how matrix(a,b,c,d,e,f) fits
into a 4x4 matrix.

Also, if we have following IDL for CSSMatrix:

interface CSSMatrix {

    attribute double a;
    attribute double b;
    attribute double c;
    attribute double d;
    attribute double e;
    attribute double f;

    attribute double m11;
    attribute double m12;
    attribute double m13;
    attribute double m14;
    attribute double m21;
    attribute double m22;
    attribute double m23;
    attribute double m24;
    attribute double m31;
    attribute double m32;
    attribute double m33;
    attribute double m34;
    attribute double m41;
    attribute double m42;
    attribute double m43;
    attribute double m44;

    void        setMatrixValue(in DOMString string) raises(DOMException);
    CSSMatrix   multiply(in CSSMatrix secondMatrix);
    CSSMatrix   inverse() raises(DOMException);
    CSSMatrix   translate(in double x, in double y, optional in double z);
    CSSMatrix   scale(in double scaleX, optional in double scaleY, optional in
double scaleZ);
    CSSMatrix   rotate(in double rotX, optional in double rotY, optional in
double rotZ);
    CSSMatrix   rotateAxisAngle(in double x, in double y, in double z, in
double angle);
    CSSMatrix   skewX(in double angle);
    CSSMatrix   skewY(in double angle);
};

a-f just make sense for a 2D Matrix. Do we want to add a flag if the matrix has
3d components? Like:

   bool    isAffine();

Internally it would do something like:

return (m13() == 0 && m14() == 0 && m23() == 0 && m24() == 0 && 
                m31() == 0 && m32() == 0 && m33() == 1 && m34() == 0 && m43()
== 0 && m44() == 1);

(from WebKit source code)

[1] http://lists.w3.org/Archives/Public/www-style/2009Dec/0233.html

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Saturday, 11 February 2012 21:15:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 11 February 2012 21:15:14 GMT