public virtual NSRect ConvertRectFromView(NSRect aRect, NSView aView)
{
NSAffineTransform matrix1, matrix2;
if (aView == this || _window == null || (aView != null && aView.Window == null))
{
return aRect;
}
if (aView != null)
{
//NS.Assert(_window == aView.Window, @"NSInvalidArgumentException");
matrix1 = aView._MatrixToWindow();
}
else
{
matrix1 = NSAffineTransform.Transform;
}
matrix2 = this._MatrixFromWindow();
return convert_rect_using_matrices(aRect, matrix1, matrix2);
}