internal ScreenDrawingContext(Rect rect) { ContextBounds = rect; renderArea = new Rect(rect.Size); background = new ColorDevice(rect.Size); foreground = new ColorDevice(rect.Size); chars = new CharDevice(rect.Size); cursorPosition = Point.Empty; }
private void SetValuesInternal(ArrayDevice <Color> device, Rect rect, Color value) { for (var row = rect.Top; row < rect.Bottom; row++) { for (var col = rect.Left; col < rect.Right; col++) { device[col, row] = value; } } }
/// <summary> /// Initialize a new instance <see cref="DefaultDrawingContext"/> /// </summary> public DefaultDrawingContext(Rect rect, Guid controlId, IDrawingContext parent) { ContextBounds = rect; renderArea = new Rect(rect.Size); background = new ColorDevice(rect.Size); foreground = new ColorDevice(rect.Size); chars = new CharDevice(rect.Size); cursorPosition = Point.Empty; ControlId = controlId; Parent = parent; }