Ejemplo n.º 1
0
        public void Transform(Transformation transformation)
        {
            System.Windows.Point translation, scale;
            double rotation;

            transformation.Decompose(out translation, out scale, out rotation);

            Center = transformation.Apply(Center);
            Size   = new System.Windows.Size(Size.Width * scale.X, Size.Height * scale.Y);
            Rotate = (Rotate + rotation) % 360;
        }
Ejemplo n.º 2
0
 private IEnumerable <double> ApplyDoubleTransformation(Transformation <double> transformation, IList <double> data, out bool success, out string errorMsg)
 {
     success = transformation.Check(data, out errorMsg);
     // don't apply when the check fails
     if (success)
     {
         return(transformation.Apply(data));
     }
     else
     {
         return(data);
     }
 }
Ejemplo n.º 3
0
 internal void Transform(List <Transformation> trs)
 {
     SplinePoint[] p = points.ToArray();
     Transformation.ResetMatrix();
     foreach (Transformation t in trs)
     {
         t.Push();
     }
     Transformation.Apply(p);
     for (int i = 0; i < p.Length; i++)
     {
         points[i] = p[i];
     }
     SplinePoint[] debugPoints = new SplinePoint[1];
     debugPoints[0] = new SplinePoint();
     Transformation.Apply(debugPoints);
 }
Ejemplo n.º 4
0
 internal void Transform(List <Transformation> trs)
 {
     SplinePoint[] array = points.ToArray();
     Transformation.ResetMatrix();
     foreach (Transformation tr in trs)
     {
         tr.Push();
     }
     Transformation.Apply(array);
     for (int i = 0; i < array.Length; i++)
     {
         points[i] = array[i];
     }
     Transformation.Apply(new SplinePoint[1]
     {
         default(SplinePoint)
     });
 }
Ejemplo n.º 5
0
 public void Transform(Transformation transformation)
 {
     Picture = transformation.Apply(Picture);
 }
Ejemplo n.º 6
0
 public void Transform(Transformation transformation)
 {
     PointOne = transformation.Apply(PointOne);
     PointTwo = transformation.Apply(PointTwo);
 }