Fixed translate() methods.
This commit is contained in:
@@ -204,16 +204,19 @@ public class AffineTransform extends AbstractTransform
|
|||||||
return Transforms.multiply(cosa, sina, -sina, cosa, 0, 0, this, this);
|
return Transforms.multiply(cosa, sina, -sina, cosa, 0, 0, this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override // from Transform
|
||||||
|
public Transform translate (float tx, float ty) {
|
||||||
|
return Transforms.multiply(this, 1, 0, 0, 1, tx, ty, this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override // from Transform
|
@Override // from Transform
|
||||||
public Transform translateX (float tx) {
|
public Transform translateX (float tx) {
|
||||||
this.tx += tx;
|
return Transforms.multiply(this, 1, 0, 0, 1, tx, 0, this);
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // from Transform
|
@Override // from Transform
|
||||||
public Transform translateY (float ty) {
|
public Transform translateY (float ty) {
|
||||||
this.ty += ty;
|
return Transforms.multiply(this, 1, 0, 0, 1, 0, ty, this);
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // from Transform
|
@Override // from Transform
|
||||||
@@ -253,7 +256,7 @@ public class AffineTransform extends AbstractTransform
|
|||||||
return Transforms.multiply((AffineTransform)other, this, new AffineTransform());
|
return Transforms.multiply((AffineTransform)other, this, new AffineTransform());
|
||||||
} else {
|
} else {
|
||||||
AffineTransform oaff = new AffineTransform(other);
|
AffineTransform oaff = new AffineTransform(other);
|
||||||
return Transforms.multiply(oaff, this, oaff);
|
return Transforms.multiplay(oaff, this, oaff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user