Qt, set individual matrix elements of QTransform -
is there way set the m_ij elements individualy in qtransform without redefining whole matrix ?
(e.g. reseting translation part)
you'd use rotate
, scale
, shear
, translate
operations indirectly change relevant elements.
if want change translation, can kinds of transforms.
void settranslation(qtransform & t, qreal x, qreal y) { q_assert(t.type() != qtransform::txrotate && t.type() != qtransform::txshear && t.type() != qtransform::txproject); x -= t.m31() / m11(); y -= t.m32() / m22(); t.translate(x, y); }
you have understand, though, elements interact , "translation" set may not act way think will.
Comments
Post a Comment