This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12089 - Under 4.8.11.1.2, Transformations, the specification reads: The transformations must be performed in reverse order. For instance, if a scale transformation that doubles the width is applied, followed by a rotation transformation that rotates drawing opera
Summary: Under 4.8.11.1.2, Transformations, the specification reads: The transformatio...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML Canvas 2D Context (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 12088 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-15 17:57 UTC by contributor
Modified: 2011-08-04 05:03 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-02-15 17:57:33 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Section: http://www.whatwg.org/specs/web-apps/current-work/complete.html#transformations

Comment:
Under 4.8.11.1.2, Transformations, the specification reads: The
transformations must be performed in reverse order. For instance, if a scale
transformation that doubles the width is applied, followed by a rotation
transformation that rotates drawing operations by a quarter turn, and a
rectangle twice as wide as it is tall is then drawn on the canvas, the actual
result will be a square. ...  This is incorrect. Rotation and scaling are
commutative. When a rectangle is rotated a quarter turn by changing the
coordinate space, the x-axis is vertical, and scaling up the x direction will
not compress the rectangle into a square. Instead, it will make it 4x as tall
as it is wide, just as it does if you scale first, then rotate.

Posted from: 67.116.239.5
Comment 1 Ms2ger 2011-02-15 20:32:47 UTC
*** Bug 12088 has been marked as a duplicate of this bug. ***
Comment 2 Aryeh Gregor 2011-02-16 00:49:11 UTC
Rotation and scaling are not commutative.  E.g.,

[ 0 -1 ] [ 2 0 ] = [ 0 -1 ]
[ 1  0 ] [ 0 1 ] = [ 2  0 ],

but

[ 2 0 ] [ 0 -1 ] = [ 0 -2 ]
[ 0 1 ] [ 1  0 ] = [ 1  0 ],

which is different.  One of those matrices is a rotation matrix, and the other is a "scaling" matrix (meaning diagonal for our purposes, I guess).

In the particular example given, take a rectangle twice as wide as it is tall.  Do a quarter turn, so now it's twice as tall as it is wide.  Double the width, and it's square.  The spec is correct.
Comment 3 Ian 'Hixie' Hickson 2011-05-03 20:11:17 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: see comment 2
Comment 4 Michael[tm] Smith 2011-08-04 05:03:41 UTC
mass-move component to LC1