public Transform ( double &px, double &py ) : void | ||
px | double | |
py | double | |
return | void |
public void Transform(ref double px, ref double py)
{
double x = px;
double y = py;
double m = 1.0 / (x * w0 + y * w1 + w2);
px = m * (x * sx + y * shx + tx);
py = m * (x * shy + y * sy + ty);
}
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; }