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 ?