Beispiel #1
0
 protected void Init(IAvnWindowBase window, IAvnScreens screens)
 {
     _native           = window;
     _glSurface        = new GlPlatformSurface(window);
     Screen            = new ScreenImpl(screens);
     _savedLogicalSize = ClientSize;
     _savedScaling     = Scaling;
 }
        protected void Init(IAvnWindowBase window, IAvnScreens screens)
        {
            _native           = 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 #3
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      = Scaling;
            _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));
        }