setViewport method

void setViewport(
  1. double x,
  2. double y,
  3. double width,
  4. double height,
)

Implementation

void setViewport(double x, double y, double width, double height) {
  _viewport.setValues(x, y, width, height);
  _currentViewport.setFrom(_viewport);
  _currentViewport.scale(_pixelRatio);
  _currentViewport.floor();
  state.viewport(_currentViewport);
}