Ejemplo n.º 1
0
        public static AffineTransformF GetRotateInstance(float angle, float x, float y)
        {
            var t = new AffineTransformF();

            t.SetToRotation(angle, x, y);
            return(t);
        }
Ejemplo n.º 2
0
        public static AffineTransformF GetShearInstance(float shx, float shy)
        {
            var m = new AffineTransformF();

            m.SetToShear(shx, shy);
            return(m);
        }
Ejemplo n.º 3
0
        public static AffineTransformF GetScaleInstance(float scx, float scY)
        {
            var t = new AffineTransformF();

            t.SetToScale(scx, scY);
            return(t);
        }
Ejemplo n.º 4
0
        public static AffineTransformF GetTranslateInstance(float mx, float my)
        {
            var t = new AffineTransformF();

            t.SetToTranslation(mx, my);
            return(t);
        }
Ejemplo n.º 5
0
 public AffineTransformF(AffineTransformF t)
 {
     _m00 = t._m00;
     _m10 = t._m10;
     _m01 = t._m01;
     _m11 = t._m11;
     _m02 = t._m02;
     _m12 = t._m12;
 }
Ejemplo n.º 6
0
 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
 }
Ejemplo n.º 7
0
        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);
            }
        }
Ejemplo n.º 8
0
 public void SetTransform(AffineTransformF t)
 {
     SetTransform(t._m00, t._m10, t._m01, t._m11, t._m02, t._m12);
 }
Ejemplo n.º 9
0
 public void Concatenate(AffineTransformF t)
 {
     SetTransform(Multiply(t, this));
 }