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(); }
public WpfGraphics(WpfImage image) { Width = image.Width; Height = image.Height; _window = image; _backBuffer = new byte[Width * Height * 4]; }