Beispiel #1
0
        protected void Init(IAvnWindowBase window, IAvnScreens screens)
        {
            _native = window;

            Handle = new MacOSTopLevelWindowHandle(window);

            _glSurface        = new GlPlatformSurface(window);
            Screen            = new ScreenImpl(screens);
            _savedLogicalSize = ClientSize;
            _savedScaling     = Scaling;

            var monitor = Screen.AllScreens.OrderBy(x => x.PixelDensity)
                          .FirstOrDefault(m => m.Bounds.Contains(Position));

            Resize(new Size(monitor.WorkingArea.Width * 0.75d, monitor.WorkingArea.Height * 0.7d));
        }
Beispiel #2
0
        protected void Init(IAvnWindowBase window, IAvnScreens screens, IGlContext glContext)
        {
            _native    = window;
            _glContext = glContext;

            Handle = new MacOSTopLevelWindowHandle(window);
            if (_gpu)
            {
                _glSurface = new GlPlatformSurface(window, _glContext);
            }
            Screen             = new ScreenImpl(screens);
            _savedLogicalSize  = ClientSize;
            _savedScaling      = RenderScaling;
            _nativeControlHost = new NativeControlHostImpl(_native.CreateNativeControlHost());

            var monitor = Screen.AllScreens.OrderBy(x => x.PixelDensity)
                          .FirstOrDefault(m => m.Bounds.Contains(Position));

            Resize(new Size(monitor.WorkingArea.Width * 0.75d, monitor.WorkingArea.Height * 0.7d));
        }