protected _MatrixFromWindow ( ) : |
||
리턴 |
public virtual NSSize ConvertSizeToView(NSSize aSize, NSView aView) { NSSize inBase = this._MatrixToWindow().TransformSize(aSize); if (inBase.Height < 0.0) { inBase.Height = -inBase.Height; } if (aView != null) { NSSize inOther; //NS.Assert(_window == aView.Window, @"NSInvalidArgumentException"); inOther = aView._MatrixFromWindow().TransformSize(inBase); if (inOther.Height < 0.0) { inOther.Height = -inOther.Height; } return inOther; } else { return inBase; } }
public virtual NSRect ConvertRectToView(NSRect aRect, NSView aView) { NSAffineTransform matrix1, matrix2; if (aView == this || _window == null || (aView != null && aView.Window == null)) { return aRect; } matrix1 = this._MatrixToWindow(); if (aView != null) { //NS.Assert(_window == aView.Window, @"NSInvalidArgumentException"); matrix2 = aView._MatrixFromWindow(); } else { matrix2 = NSAffineTransform.Transform; } return convert_rect_using_matrices(aRect, matrix1, matrix2); }