Transform() public method

public Transform ( double &px, double &py ) : void
px double
py double
return void
Ejemplo n.º 1
0
 public void scaling(out double x, out double y)
 {
     double x1 = 0.0;
     double y1 = 0.0;
     double x2 = 1.0;
     double y2 = 1.0;
     Perspective t = new Perspective(this);
     t *= Affine.NewRotation(-rotation());
     t.Transform(ref x1, ref y1);
     t.Transform(ref x2, ref y2);
     x = x2 - x1;
     y = y2 - y1;
 }
Ejemplo n.º 2
0
 // Inverse transformation of x and y. It works slow because
 // it explicitly inverts the matrix on every call. For massive 
 // operations it's better to invert() the matrix and then use 
 // direct transformations. 
 public void inverse_transform(ref double x, ref double y)
 {
     Perspective t = new Perspective(this);
     if (t.invert()) t.Transform(ref x, ref y);
 }