replaceGeometry method

void replaceGeometry(
  1. {required Geometry? geometry}
)

Replaces the geometry currently stored in the geometry builder with the new geometry.

This method can be used as an alternative to creating a new builder from an existing geometry. Note that this does not update the spatial reference of the builder and the builder geometry is cleared if the geometry is null. Geometries with curves are supported.

Parameters:

  • geometry — A geometry object.

Implementation

void replaceGeometry({required Geometry? geometry}) {
  _withThrowingErrorHandler((errorHandler) {
    runtimecore.RT_GeometryBuilder_replaceGeometry(
        _handle, geometry?._handle ?? ffi.nullptr, errorHandler);
  });
}