The ShapeTransform struct Rotation, skew and scale applied to a shape's local geometry around an arbitrary local pivot point.
These five scalars plus a pivot are a convenient, directly-editable basis for 2D affine transforms: every handle in the UI changes exactly one field, which is what makes per-handle drag math simple. Note that a plain 2x2 linear map only has 4 true degrees of freedom, one fewer than (rotation, skewX, skewY, scaleX, scaleY) – so this is not a unique* representation of a matrix, only a convenient one. That redundancy is harmless for editing (nothing here ever needs to invert the forward direction) and only matters to decomposeLinear() below, which exists for later consumers (flattening a group transform onto its children, importing a foreign matrix) rather than everyday use.
The resulting matrix is meant to be handed directly to QGraphicsItem::setTransform(). QGraphicsItem::transformOriginPoint() is deliberately NOT used anywhere in this design: it only centers QGraphicsItem's own rotation()/scale() convenience properties, and has no effect on a custom transform() matrix – the pivot has to be baked into the matrix itself, as toMatrix() does. QGraphicsItem::pos() supplies the translation on top, unchanged from how shapes are already positioned and moved today.