.TH "ShapeTransform" 3 "Version 0.200.1-dev" "QElectroTech" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ShapeTransform \- The \fBShapeTransform\fP struct Rotation, skew and scale applied to a shape's local geometry around an arbitrary local pivot point\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fR#include <shapetransform\&.h>\fP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "bool \fBisIdentity\fP () const"
.br
.ti -1c
.RI "QTransform \fBlinearPart\fP () const"
.br
.ti -1c
.RI "QTransform \fBtoMatrix\fP () const"
.br
.ti -1c
.RI "bool \fBoperator==\fP (const \fBShapeTransform\fP &other) const"
.br
.ti -1c
.RI "bool \fBoperator!=\fP (const \fBShapeTransform\fP &other) const"
.br
.in -1c
.SS "Public Attributes"

.in +1c
.ti -1c
.RI "qreal \fBrotation\fP = 0"
.br
.ti -1c
.RI "qreal \fBskewX\fP = 0"
.br
.ti -1c
.RI "qreal \fBskewY\fP = 0"
.br
.ti -1c
.RI "qreal \fBscaleX\fP = 1"
.br
.ti -1c
.RI "qreal \fBscaleY\fP = 1"
.br
.ti -1c
.RI "QPointF \fBpivot\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The \fBShapeTransform\fP 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 \fBdecomposeLinear()\fP below, which exists for later consumers (flattening a group transform onto its children, importing a foreign matrix) rather than everyday use\&.

.PP
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 \fBrotation()\fP/scale() convenience properties, and has no effect on a custom transform() matrix -- the pivot has to be baked into the matrix itself, as \fBtoMatrix()\fP does\&. QGraphicsItem::pos() supplies the translation on top, unchanged from how shapes are already positioned and moved today\&. 
.SH "Member Function Documentation"
.PP 
.SS "bool ShapeTransform::isIdentity () const"

.SS "QTransform ShapeTransform::linearPart () const"

.SS "bool ShapeTransform::operator!= (const \fBShapeTransform\fP & other) const\fR [inline]\fP"

.SS "bool ShapeTransform::operator== (const \fBShapeTransform\fP & other) const"

.SS "QTransform ShapeTransform::toMatrix () const"

.SH "Member Data Documentation"
.PP 
.SS "QPointF ShapeTransform::pivot"

.SS "qreal ShapeTransform::rotation = 0"

.SS "qreal ShapeTransform::scaleX = 1"

.SS "qreal ShapeTransform::scaleY = 1"

.SS "qreal ShapeTransform::skewX = 0"

.SS "qreal ShapeTransform::skewY = 0"


.SH "Author"
.PP 
Generated automatically by Doxygen for QElectroTech from the source code\&.
