public static AffineTransformF GetRotateInstance(float angle, float x, float y) { var t = new AffineTransformF(); t.SetToRotation(angle, x, y); return(t); }
public static AffineTransformF GetShearInstance(float shx, float shy) { var m = new AffineTransformF(); m.SetToShear(shx, shy); return(m); }
public static AffineTransformF GetScaleInstance(float scx, float scY) { var t = new AffineTransformF(); t.SetToScale(scx, scY); return(t); }
public static AffineTransformF GetTranslateInstance(float mx, float my) { var t = new AffineTransformF(); t.SetToTranslation(mx, my); return(t); }
public AffineTransformF(AffineTransformF t) { _m00 = t._m00; _m10 = t._m10; _m01 = t._m01; _m11 = t._m11; _m02 = t._m02; _m12 = t._m12; }
private AffineTransformF Multiply(AffineTransformF t1, AffineTransformF t2) { return(new AffineTransformF( t1._m00 * t2._m00 + t1._m10 * t2._m01, // m00 t1._m00 * t2._m10 + t1._m10 * t2._m11, // m01 t1._m01 * t2._m00 + t1._m11 * t2._m01, // m10 t1._m01 * t2._m10 + t1._m11 * t2._m11, // m11 t1._m02 * t2._m00 + t1._m12 * t2._m01 + t2._m02, // m02 t1._m02 * t2._m10 + t1._m12 * t2._m11 + t2._m12)); // m12 }
public PathF(PathF prototype, AffineTransformF transform = null) : this() { _operations.AddRange(prototype._operations); foreach (var point in prototype.Points) { var newPoint = point; if (transform != null) { newPoint = transform.Transform(point); } _points.Add(newPoint); } if (prototype._arcAngles != null) { _arcAngles = new List <float>(); _arcClockwise = new List <bool>(); _arcAngles.AddRange(prototype._arcAngles); _arcClockwise.AddRange(prototype._arcClockwise); } }
public void SetTransform(AffineTransformF t) { SetTransform(t._m00, t._m10, t._m01, t._m11, t._m02, t._m12); }
public void Concatenate(AffineTransformF t) { SetTransform(Multiply(t, this)); }