arcgis 畫各類element(LineElement, PolygonElement)

private IElement createPolylineElement() throws Exception
	{
		ISegmentCollection segmentCollection = new Path();
		
		CircularArc arc = new CircularArc();
		Point start = new Point();
		Point end = new Point();
		Point middle = new Point();
		start.putCoords(200, 200);
		end.putCoords(400, 200);
		middle.putCoords(300, 250);
		arc.constructThreePoints(start, end, middle, false);
		segmentCollection.addSegment(arc, null, null);
		
		Polyline polyline = new Polyline();
		IGeometry geometry = (IGeometry)(segmentCollection);
		polyline.addGeometry(geometry, null, null);
		
		ILineSymbol lineSymbol = MakeNewSimpleLineSymbol();
		LineElement lineElement = new LineElement();
		lineElement.setSymbol(lineSymbol);
		lineElement.setGeometry(polyline);
		
		return lineElement;
	}
相關文章
相關標籤/搜索