* Draw the viewport of this window. */
| 1901 | * Draw the viewport of this window. |
| 1902 | */ |
| 1903 | void Window::DrawViewport() const |
| 1904 | { |
| 1905 | PerformanceAccumulator framerate(PFE_DRAWWORLD); |
| 1906 | |
| 1907 | DrawPixelInfo *dpi = _cur_dpi; |
| 1908 | |
| 1909 | dpi->left += this->left; |
| 1910 | dpi->top += this->top; |
| 1911 | |
| 1912 | ViewportDraw(*this->viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height); |
| 1913 | |
| 1914 | dpi->left -= this->left; |
| 1915 | dpi->top -= this->top; |
| 1916 | } |
| 1917 | |
| 1918 | /** |
| 1919 | * Ensure that a given viewport has a valid scroll position. |