setViewport method

dynamic setViewport(
  1. dynamic x,
  2. dynamic y,
  3. dynamic width,
  4. dynamic height, [
  5. dynamic minDepth = 0,
  6. dynamic maxDepth = 1,
])

Implementation

setViewport(x, y, width, height, [minDepth = 0, maxDepth = 1]) {
  if (x == null) {
    this._viewport = null;
  } else {
    this._viewport = {
      "x": x,
      "y": y,
      "width": width,
      "height": height,
      "minDepth": minDepth,
      "maxDepth": maxDepth
    };
  }
}