diff --git a/gfx/public/nsTransform2D.h b/gfx/public/nsTransform2D.h index 6612da2c099d..a2b9985aae4a 100644 --- a/gfx/public/nsTransform2D.h +++ b/gfx/public/nsTransform2D.h @@ -120,6 +120,20 @@ public: void GetTranslation(float *ptX, float *ptY) { *ptX = m20; *ptY = m21; } void GetTranslationCoord(nscoord *ptX, nscoord *ptY) { *ptX = NSToCoordRound(m20); *ptY = NSToCoordRound(m21); } + /** + * set the translation portion of this transform + * + * @param tx, x translation + * @param ty, y translation + * @exception + **/ + + void SetTranslation(float tX, float tY) { + m20 = tX; + m21 = tY; + type |= MG_2DTRANSLATION; + } + /** * get the X translation portion of this transform *