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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -