resize method

Future<CommandCompletion> resize(
  1. LogicalSize logicalSize
)

Resizes the session's target and its map.

The session renders at the map's scale factor. Release every acquired frame first.

See mln_render_session_resize in the C API reference.

Errors:

  • Status.unsupported when the session renders into a borrowed ring. Give it new textures of the new size instead.
  • Status.targetLost when the session loses its target before the resize applies.

Implementation

Future<CommandCompletion> resize(LogicalSize logicalSize) => _command(
  (arena, completion) => raw.mln_render_session_resize(
    _handle.raw,
    _writeLogicalSize(logicalSize, arena).ref,
    completion,
    nativeDiagnostic,
  ),
);