MutablePart class final

Represents a single part of a multipart builder.

Multipart builder is the base class of PolygonBuilder or PolylineBuilder. A part is made up of a collection of segments making the edge of the multipart. Additionally access and modified using the points (vertexes) of segments is available. Adjacent segments which share an end point and a start point are connected and the shared vertex is not duplicated when accessing points. The mutable part can represent gaps between one end point and an adjacent start. However, this is only recommended as a temporary state while modifying a multipart builder, when using GeometryBuilder.toGeometry the gaps are closed with line segments.

Both linear segments (represented by LineSegment) and curve segments (represented by CubicBezierSegment or EllipticArcSegment) are supported. Curve and linear segments can be mixed together in the same geometry.

Implemented types

Constructors

MutablePart({SpatialReference? spatialReference})
Creates a part with a specified spatial reference.
factory

Properties

endPoint ArcGISPoint?
The end point of the last segment in the part. Returns null if the collection is empty.
no setter
hasCurves bool
True if the part contains any curve segments, false otherwise.
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Indicates if the part contains no segments.
no setter
pointCount int
The count of points in the part.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segmentCount int
The count of segments in the part.
no setter
spatialReference SpatialReference?
The spatial reference for the part.
no setter
startPoint ArcGISPoint?
The start point of the first segment in the part. Returns null if the collection is empty.
no setter

Methods

addPoint(ArcGISPoint point) int
Add a new point to the end of the part. A new line segment is added to connect the new point to the previous.
addPointXY({required double x, required double y}) int
Add a new point to the end of the part by specifying the points x,y coordinates. A new line segment is added to connect the new point to the previous.
addPointXYZ({required double x, required double y, required double z}) int
Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment is added to connect the new point to the previous.
addSegment(Segment segment) int
Add segment to the end of the part.
getEndPointIndexFromSegmentIndex(int segmentIndex) int
For a segment at a specified segment_index the method returns the point index of the segment's end point.
getPoint({required int pointIndex}) ArcGISPoint
Returns a point at a specified point index.
getPoints() ImmutablePointCollection
Returns all the points that are the vertexes of the part.
getSegment({required int segmentIndex}) Segment
Gets a segment at a specified segment index.
getSegmentIndexFromEndPointIndex(int pointIndex) int
Converts from a point index to a segment index that uses the given point as an end point. If the point is not an end point, then -1 is returned.
getSegmentIndexFromStartPointIndex(int pointIndex) int
Converts from a point index to a segment index that uses the given point as a start point. If the point is not a start point, then -1 is returned.
getStartPointIndexFromSegmentIndex(int segmentIndex) int
For a segment at a specified segment_index the method returns the point index of the segment's start point.
insertPoint({required int pointIndex, required ArcGISPoint point}) → void
Inserts a point into the part at the specified point index. Line segments are added to connect the point to adjacent segments.
insertPointXY({required int pointIndex, required double x, required double y}) → void
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.
insertPointXYZ({required int pointIndex, required double x, required double y, required double z}) → void
Inserts a point specified by its x,y,z coordinate into the part at the specified point index. Line segments are added to connect the point to adjacent segments.
insertSegment({required int segmentIndex, required Segment segment}) → void
Inserts a segment into the part at the specified index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAll() → void
Remove all segments from the part.
removePoint({required int pointIndex}) → void
Removes a point from the part. Segments connecting to this point are removed and the gap filled with a new line segment.
removeSegment({required int segmentIndex}) → void
Remove a segment at the specified index from the part.
setPoint({required int pointIndex, required ArcGISPoint point}) → void
Replace a point in the part at the specified point index. Segments that use this point are changed.
setSegment({required int segmentIndex, required Segment segment}) → void
Replaces a segment at the specified index in the part.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited