render method Null safety

  1. @override
void render(
  1. RenderState renderState
)
override

Renders this display object with the given renderState. The display object is rendered without its filters.

Implementation

@override
void render(RenderState renderState) {
  if (_viewportRectangle == null) {
    super.render(renderState);
  } else {
    renderState.renderContext.beginRenderMask(renderState, _viewportMask!);
    renderState.push(_viewportMatrix, 1.0, renderState.globalBlendMode);
    super.render(renderState);
    renderState.pop();
    renderState.renderContext.endRenderMask(renderState, _viewportMask!);
  }
}