예제 #1
0
        public static AffineTransformF GetRotateInstance(float angle, float x, float y)
        {
            var t = new AffineTransformF();

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

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

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

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