Bug 83517 - add a setTranslation method. patch by

alex.fritze@crocodile-clips.com, r=pavlov, sr=jst
This commit is contained in:
bbaetz%cs.mcgill.ca 2001-11-21 04:10:31 +00:00
parent 0f7937eaa3
commit 8715a75f59

View File

@ -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
*