src/viewport.cpp
branchcpp_gui
changeset 6244 4b42fb40e6d2
parent 6237 bce32e54c993
child 6245 6fa82c6ee8ca
equal deleted inserted replaced
6243:8f231ee779cb 6244:4b42fb40e6d2
  1330 	if (bottom > vp->top + vp->height) bottom = vp->top + vp->height;
  1330 	if (bottom > vp->top + vp->height) bottom = vp->top + vp->height;
  1331 
  1331 
  1332 	ViewportDrawChk(vp, left, top, right, bottom);
  1332 	ViewportDrawChk(vp, left, top, right, bottom);
  1333 }
  1333 }
  1334 
  1334 
  1335 void DrawWindowViewport(const Window *w)
  1335 void Window::DrawViewport() const
  1336 {
  1336 {
  1337 	DrawPixelInfo *dpi = _cur_dpi;
  1337 	DrawPixelInfo *dpi = _cur_dpi;
  1338 
  1338 
  1339 	dpi->left += w->left;
  1339 	dpi->left += left;
  1340 	dpi->top += w->top;
  1340 	dpi->top += top;
  1341 
  1341 
  1342 	ViewportDraw(w->viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height);
  1342 	ViewportDraw(viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height);
  1343 
  1343 
  1344 	dpi->left -= w->left;
  1344 	dpi->left -= left;
  1345 	dpi->top -= w->top;
  1345 	dpi->top -= top;
  1346 }
  1346 }
  1347 
  1347 
  1348 void UpdateViewportPosition(Window *w)
  1348 void UpdateViewportPosition(Window *w)
  1349 {
  1349 {
  1350 	const ViewPort *vp = w->viewport;
  1350 	const ViewPort *vp = w->viewport;