//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Recalculate row count, column count and the rectangle that is onscreen. </summary> /// /// <remarks> Darrellp, 10/12/2011. </remarks> //////////////////////////////////////////////////////////////////////////////////////////////////// internal void RecalculateSize() { // Do some magic to get pixels and thence rows/columns Size sizeScreenMap = PixelConversions.GetElementPixelSize(_mapHost); _screenColumnCount = (int)sizeScreenMap.Width / _charWidth; _screenRowCount = (int)sizeScreenMap.Height / _charHeight; _onScreen = new Rect(_onScreen.Left, _onScreen.Top, _screenColumnCount, _screenRowCount); }
private void ScrollBy(int dleft, int dtop) { _onScreen = new Rect(_onScreen.Left - dleft, _onScreen.Top - dtop, _onScreen.Width, _onScreen.Height); _terminal.Scroll(dleft, dtop, ScrollCallback); }