I have been studying "transformation" in recent days, and now I know how to translate, rotate, skew, scale using matirx transform. but if I want to do all the actions above in a single conversion expression, how can I do this?
ctx.transform(a,b,c,d,e,f);
when we want to rotate something by conversion, we must send 4 arguments for each of them (a, b, c, d). So, if I want to rotate and scale, for example, rotate 30 degrees and scale (1,5,2), can the conversion do them at the same time? so what are the values (a, b, c, d)? and how to calculate them?
and one more question: is there an order in the conversion? I mean, if I use transform to rotate, scale, and translate, what is the order between them? in the end, the order is very important, "translate first, scale further", "begin first", "translate next", get different results.
javascript canvas transform
Lixer
source share