Example #1
0
        private static void RegisterServices(ContainerBuilder builder)
        {
            var image = new WpfImage(640, 480);

            builder.RegisterInstance(new WpfGraphics(image)).SingleInstance();
            builder.RegisterType <MapService>().SingleInstance();
            builder.RegisterType <PathfindingService>().SingleInstance();
        }
Example #2
0
        public WpfGraphics(WpfImage image)
        {
            Width  = image.Width;
            Height = image.Height;

            _window     = image;
            _backBuffer = new byte[Width * Height * 4];
        }