Transformations in Graphics 2.0

We have got following questions by using the transformations from the new Graphics 2.0 API:

  • For the transformation of graphic objects we used to use matrices. In the Graphics 2.0 there are three methods: scale, translate and rotate. Is there a possibility to apply transformations defined as a 3x3 matrix or we have to decompose the matrix into the sequence of calls of that methods.

  • There are groups in the Graphics 2.0 and one can apply transformations to the group. If we have a hierarchy of enclosed groups, something like this: rootGroup -> childGroup1 ->childGroup2 and each group has its own transformation, how could we compute the resulting transformation for the rootGroup ? In which order are the transformations applied ?

  • In the Gfx 2.0 there is an quite “uncommon” way to define polygons: one have to specify the coordinates of the polygon’s center and the polygon’s points, e.g display.newPolygon(100, 100, {100, 100, 200, 100, 200, 200, 100, 200}). If a polygon belongs to a group and this group is transformed, is the center point transformed also, or we have to recompute the center on our own ?

If you put something into group then all transformations applied to group have also effect on childrens.

Corona bet on simplicity for great range of developers so there is no method with matrices (despite using it under the hood).
You only have access to wrapper functions as scale, rotation… (which are not graphics 2.0 specific - they were from the beggining), so you have to change your previous methods to decomposed steps.

In Corona you do not have to calculate anything yourself in regards of transformations in nasted groups. You just draw polygon, insert it into group, rotate polygon by 30 degrees, rotate group by degrees and you already have group rotated 20 degrees on screen and polygon rotated 50 degrees on screen in regard to its original rotation.
The same with position and scale.

If you put something into group then all transformations applied to group have also effect on childrens.

Corona bet on simplicity for great range of developers so there is no method with matrices (despite using it under the hood).
You only have access to wrapper functions as scale, rotation… (which are not graphics 2.0 specific - they were from the beggining), so you have to change your previous methods to decomposed steps.

In Corona you do not have to calculate anything yourself in regards of transformations in nasted groups. You just draw polygon, insert it into group, rotate polygon by 30 degrees, rotate group by degrees and you already have group rotated 20 degrees on screen and polygon rotated 50 degrees on screen in regard to its original rotation.
The same with position and scale.