The transformations must be performed in reverse order.
译文:必须以相反的顺序执行变换。
Note: For instance, if a scale transformation that doubles the width is applied to the canvas, 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.
HTML 标准 中规定:
可以理解为在当前已变换的坐标系上再添加变换(矩阵右乘)
但对人而言更直观的是在初始的固定的坐标系上进行变换(矩阵左乘)
下图展示了先
rotate
再scale
和先scale
再rotate
的两种效果Pen: https://codepen.io/mannix-zho...