internal ConsoleGraphics(ConsoleOutputHandle consoleOutputHandle, INativeCalls api, Size size, FrameCharSets frameCharSets) { this.consoleOutputHandle = consoleOutputHandle; this.api = api; this.size = size; this.frameCharSets = frameCharSets; Logger.Log(DebugContext.ConsoleApi | DebugContext.Graphics, $"Initializing buffer with size {this.size}."); buffer = api.ReadConsoleOutput(consoleOutputHandle, new Rectangle(Point.Empty, size)); }
public void FrameCharSetsIndexer_UndefinedStyle_SingleLinedSet() { var sut = new ConControls.Controls.Drawing.FrameCharSets(); sut[(BorderStyle)0x7FFFFFF].Should().BeOfType <SingleLinedFrameCharSet>(); }
public IConsoleGraphics Provide(ConsoleOutputHandle consoleOutputHandle, INativeCalls api, Size size, FrameCharSets frameCharSets) => new ConsoleGraphics(consoleOutputHandle, api, size, frameCharSets);
public void FrameCharSetsIndexer_BoldLinedStyle_BoldLinedSet() { var sut = new ConControls.Controls.Drawing.FrameCharSets(); sut[BorderStyle.Bold].Should().BeOfType <BoldLinedFrameCharSet>(); }