mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
Bug 83517 - add a setTranslation method. patch by
alex.fritze@crocodile-clips.com, r=pavlov, sr=jst
This commit is contained in:
parent
0f7937eaa3
commit
8715a75f59
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user