better support form matrix transformation

Matrix transformations are now handled by creating a group with
the corresponding transformation.
The previous way (compute the transformation on each point) was wrong
for texts, rectangles and many other shapes.