scalewidth | (Long) The rotation angle in radians |
---|
The transformation methods transform, translate, scale or rotate modify some (or all) values of the transformation matrix. Each method saves the current state of the transformation matrix and then applies the modification(s). It means that these modifications are cumulative.
By contrast, the setTransform transformation method first sets the currently valid transformation matrix to the default value and then executes the transform transformation. This makes it the only transformation method that cen reset all cumulated transformations and set new transformation that is not cumulated.
ctx.rotate(20*Pm.PI/180);
ctx.strokeRect(5, 5, 25, 10);