Ejemplo n.º 1
0
        public async Task Draw(CompositionGraphicsDevice device, Object drawingLock, ContentDrawer drawer)
        {
            Debug.Assert(_surface != null);

            _drawer = drawer;
            await _drawer.Draw(device, drawingLock, _surface, _surface.Size);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (_surface != null)
            {
                _surface.Dispose();
                _surface = null;
            }

            if (_brush != null)
            {
                _brush.Dispose();
                _brush = null;
            }

            _drawer = null;

            ImageLoader.Instance.UnregisterSurface(this);
        }