Closes all paths of the geometry (has to be a polyline or polygon).
187501
void closeAllPaths(int geometry) {
		if (getGeometryType(geometry) == Geometry.GeometryType.Polygon)
			return;
		if (!Geometry.isLinear(getGeometryType(geometry)))
			throw GeometryException.GeometryInternalError();

		for (int path = getFirstPath(geometry); path != -1; path = getNextPath(path)) {
			setClosedPath(path, true);
		}
	}
745959
function (closed) {
    if (closed === undefined) closed = false;
    if (closed) this.context.closePath();
    this.context.fill();
    this.pathStarted = false;
  }
837210
@Override
    public void clear() {
        try {
            lockAllSegments();
            for (LinkedHashMapSegment<K, V> seg : segments) {
                seg.clear();
            }
        } finally {
            unlockAllSegments();
        }
    }
969561
public void closePath() {
		if (this.numTypesProperty.get()<=0 ||
				(this.types[this.numTypesProperty.get()-1]!=PathElementType.CLOSE
				&&this.types[this.numTypesProperty.get()-1]!=PathElementType.MOVE_TO)) {
			ensureSlots(true, 0);
			this.types[this.numTypesProperty.get()] = PathElementType.CLOSE;
			this.numTypesProperty.set(this.numTypesProperty.get()+1);
		}
	}
972025
public void closeAll() {

        // Close any active streams
        for (InterceptedStream<T> stream : streams.values())
            close(stream.getStream());

        // Remove now-useless references
        streams.clear();

    }

    /**
     * Blocks until the given stream is closed, or until another stream with
     * the same index replaces it.
     *
     * @param stream
     *     The stream to wait for.
     */
    public void waitFor(InterceptedStream<T> stream) {

        T underlyingStream = stream.getStream();

        // Wait for stream to close
        synchronized (underlyingStream) {
            while (streams.get(stream.getIndex()) == stream) {
                try {
                    underlyingStream.wait(STREAM_WAIT_TIMEOUT);
                }
                catch (InterruptedException e) {
                    // Ignore
                }
            }
        }

    }

    /**
     * Returns the stream stored in this map under the given index.
     *
     * @param index
     *     The index of the stream to return.
     *
     * @return
     *     The stream having the given index, or null if no such stream is
     *     stored within this map.
     */
    public InterceptedStream<T> get(String index) {
        return streams.get(index);
    }

    /**
     * Adds the given stream to this map, storing it under its associated
     * index. If another stream already exists within this map having the same
     * index, that stream will be closed and replaced.
     *
     * @param stream
     *     The stream to store within this map.
     */
    public void put(InterceptedStream<T> stream) {

        // Add given stream to map
        InterceptedStream<T> oldStream =
                streams.put(stream.getIndex(), stream);

        // If a previous stream DID exist, close it
        if (oldStream != null)
            close(oldStream.getStream());

    }

}
976913
public void clear()
    {
        DelaunayTriangle t;
        for( int i=0; i<3; i++ )
        {
            t = neighbors[i];
            if( t != null )
            {
                t.clearNeighbor( this );
            }
        }
        clearNeighbors();
        points[0]=points[1]=points[2]=null;
    }
9346
function() {
        var index = this.line.geometry.components.length - 1;
        this.line.geometry.removeComponent(this.line.geometry.components[index]);
        this.removePoint();
        this.finalize();
    }
1059339
function() {
        var geom;
        for(var i=0; i<8; ++i) {
            geom = this.box.geometry.components[i];
            geom._handle.destroy();
            geom._handle = null;
            geom._rotationHandle && geom._rotationHandle.destroy();
            geom._rotationHandle = null;
        }
        this.center = null;
        this.feature = null;
        this.handles = null;
        this.rotationHandleSymbolizer = null;
        this.rotationHandles = null;
        this.box.destroy();
        this.box = null;
        this.layer = null;
        this.dragControl.destroy();
        this.dragControl = null;
        OpenLayers.Control.prototype.destroy.apply(this, arguments);
    }
119325
def path_encloses_pt(pt, opt, path):
    """"""
    assert path.isclosed()
    intersections = Path(Line(pt, opt)).intersect(path)
    if len(intersections) % 2:
        return True
    else:
        return False
937380
function () {
    if (this.isClosed){ return; }
    this.regionManager.close();
    var args = Array.prototype.slice.apply(arguments);
    Marionette.ItemView.prototype.close.apply(this, args);
  }
700393
def close(self):
        
        logger.debug("Finalizing: {}".format(self))
        super(ArgosPgPlotItem, self).close()
376041
public static boolean shouldClosePath(VectorTile.Tile.GeomType geomType) {
        final boolean closeReq;

        switch(geomType) {
            case POLYGON:
                closeReq = true;
                break;
            default:
                closeReq = false;
                break;
        }

        return closeReq;
    }
311785
def path_valid(self):
        
        valid = [i is not None for i in self.polygons_closed]
        valid = np.array(valid, dtype=np.bool)
        return valid
1003567
void dissolveCommonEdges_() {
		int visitedEdges = m_topo_graph.createUserIndexForHalfEdges();
		AttributeStreamOfInt32 edgesToDelete = new AttributeStreamOfInt32(0);
		// Now extract paths that
		for (int cluster = m_topo_graph.getFirstCluster(); cluster != -1; cluster = m_topo_graph
				.getNextCluster(cluster)) {
			int firstHalfEdge = m_topo_graph.getClusterHalfEdge(cluster);
			int half_edge = firstHalfEdge;
			if (firstHalfEdge == -1)
				continue;

			do {
				int visited = m_topo_graph.getHalfEdgeUserIndex(half_edge,
						visitedEdges);
				if (visited != 1) {
					int halfEdgeTwin = m_topo_graph.getHalfEdgeTwin(half_edge);
					m_topo_graph.setHalfEdgeUserIndex(halfEdgeTwin,
							visitedEdges, 1);
					m_topo_graph.setHalfEdgeUserIndex(half_edge, visitedEdges,
							1);
					int parentage = m_topo_graph
							.getHalfEdgeFaceParentage(half_edge);
					if (isGoodParentage(parentage)) {
						int twinParentage = m_topo_graph
								.getHalfEdgeFaceParentage(halfEdgeTwin);
						if (isGoodParentage(twinParentage)) {
							// This half_edge pair is a border between two faces
							// that share the parentage or it is a dangling edge
							edgesToDelete.add(half_edge);// remember for
															// subsequent delete
						}
					}
				}

				half_edge = m_topo_graph.getHalfEdgeNext(m_topo_graph
						.getHalfEdgeTwin(half_edge));
			} while (half_edge != firstHalfEdge);
		}

		m_topo_graph.deleteUserIndexForHalfEdges(visitedEdges);
		m_topo_graph.deleteEdgesBreakFaces_(edgesToDelete);
	}
1087490
public void closePolygonRing(List<LatLng> points) {
        if (!PolyUtil.isClosedPolygon(points)) {
            LatLng first = points.get(0);
            points.add(new LatLng(first.latitude, first.longitude));
        }
    }
744471
def close(self):
        """"""
        for i in range(0, len(active_canvases)):
            if active_canvases[i] == self:
                del active_canvases[i]
                return
1096540
@Override
  public void close() {
    assertIsOpen();
    flush();
    compactor.close();
    segments.close();
    open = false;
  }