insertPointXY method
Inserts a point specified by its x,y coordinates into the part at the specified point index. Line segments are added to connect the point to adjacent segments.
The point index can be equal to the point count and this is equivalent to adding a point to the end of the collection. The points in the part are the start and end points of segments. An existing segment connection the point before or after the point index is removed. Inserting a new point inserts new line segments connecting the adjacent points.
Parameters:
pointIndex
— Zero-based index of the point.x
— The x-coordinate of the new point.y
— The y-coordinate of the new point.
Implementation
void insertPointXY({
required int pointIndex,
required double x,
required double y,
}) {
_withThrowingErrorHandler((errorHandler) {
runtimecore.RT_MutablePart_insertPointXY(
_handle,
pointIndex,
x,
y,
errorHandler,
);
});
}