Пример #1
0
 public FramebufferShimRenderTarget(IFramebufferPlatformSurface surface,
                                    ImagingFactory imagingFactory, Factory d2dFactory, SharpDX.DirectWrite.Factory dwriteFactory)
 {
     _surface        = surface;
     _imagingFactory = imagingFactory;
     _d2DFactory     = d2dFactory;
     _dwriteFactory  = dwriteFactory;
 }
Пример #2
0
        public TopLevelImpl(Context context, bool placeOnTop = false)
        {
            _view           = new ViewImpl(context, this, placeOnTop);
            _keyboardHelper = new AndroidKeyboardEventsHelper <TopLevelImpl>(this);
            _touchHelper    = new AndroidTouchEventsHelper <TopLevelImpl>(this, () => InputRoot,
                                                                          p => GetAvaloniaPointFromEvent(p));

            _gl          = GlPlatformSurface.TryCreate(this);
            _framebuffer = new FramebufferManager(this);

            MaxClientSize = new Size(_view.Resources.DisplayMetrics.WidthPixels,
                                     _view.Resources.DisplayMetrics.HeightPixels);
        }
Пример #3
0
        public TopLevelImpl(Context context, bool placeOnTop = false)
        {
            _view            = new ViewImpl(context, this, placeOnTop);
            _textInputMethod = new AndroidInputMethod <ViewImpl>(_view);
            _keyboardHelper  = new AndroidKeyboardEventsHelper <TopLevelImpl>(this);
            _touchHelper     = new AndroidTouchEventsHelper <TopLevelImpl>(this, () => InputRoot,
                                                                           GetAvaloniaPointFromEvent);
            _gl          = GlPlatformSurface.TryCreate(this);
            _framebuffer = new FramebufferManager(this);

            RenderScaling = (int)_view.Scaling;

            MaxClientSize = new PixelSize(_view.Resources.DisplayMetrics.WidthPixels,
                                          _view.Resources.DisplayMetrics.HeightPixels).ToSize(RenderScaling);
        }
Пример #4
0
        public TopLevelImpl(AvaloniaView avaloniaView, bool placeOnTop = false)
        {
            _view            = new ViewImpl(avaloniaView.Context, this, placeOnTop);
            _textInputMethod = new AndroidInputMethod <ViewImpl>(_view);
            _keyboardHelper  = new AndroidKeyboardEventsHelper <TopLevelImpl>(this);
            _pointerHelper   = new AndroidMotionEventsHelper(this);
            _gl          = GlPlatformSurface.TryCreate(this);
            _framebuffer = new FramebufferManager(this);

            RenderScaling = _view.Scaling;

            MaxClientSize = new PixelSize(_view.Resources.DisplayMetrics.WidthPixels,
                                          _view.Resources.DisplayMetrics.HeightPixels).ToSize(RenderScaling);

            NativeControlHost = new AndroidNativeControlHostImpl(avaloniaView);
            StorageProvider   = new AndroidStorageProvider((AvaloniaActivity)avaloniaView.Context);
        }
Пример #5
0
 /// <summary>
 /// Create new framebuffer render target using a target surface.
 /// </summary>
 /// <param name="platformSurface">Target surface.</param>
 public FramebufferRenderTarget(IFramebufferPlatformSurface platformSurface)
 {
     _platformSurface = platformSurface;
 }
 public FramebufferRenderTarget(IFramebufferPlatformSurface surface)
 {
     _surface = surface;
 }
Пример #7
0
 public FramebufferFrame(IFramebufferPlatformSurface framebuffer, TimeSpan time = default(TimeSpan))
 {
     Framebuffer = framebuffer;
     Time        = time;
 }