예제 #1
0
        private async Task <ManagedSurface> LoadFromUriAsyncWorker(Uri uri, Size size, LoadTimeEffectHandler handler)
        {
            ManagedSurface surface = new ManagedSurface(CreateSurface(size));
            await surface.Draw(_graphicsDevice, _drawingLock, new BitmapDrawer(uri, handler));

            return(surface);
        }
예제 #2
0
        public ManagedSurface LoadCircle(float radius, Color color)
        {
            ManagedSurface surface = new ManagedSurface(CreateSurface(new Size(radius * 2, radius * 2)));
            var            ignored = surface.Draw(_graphicsDevice, _drawingLock, new CircleDrawer(radius, color));

            return(surface);
        }
예제 #3
0
        public ManagedSurface LoadText(string text, Size size, CanvasTextFormat textFormat, Color textColor, Color bgColor)
        {
            ManagedSurface surface = new ManagedSurface(CreateSurface(size));
            var            ignored = surface.Draw(_graphicsDevice, _drawingLock, new TextDrawer(text, textFormat, textColor, bgColor));

            return(surface);
        }
예제 #4
0
        public ManagedSurface LoadFromUri(Uri uri, Size size, LoadTimeEffectHandler handler)
        {
            ManagedSurface surface = new ManagedSurface(CreateSurface(size));
            var            ignored = surface.Draw(_graphicsDevice, _drawingLock, new BitmapDrawer(uri, handler));

            return(surface);
        }