ISimpleFillSymbol fillSymbol = new SimpleFillSymbolClass(); RgbColorClass red = new RgbColorClass() { Red = 255, Green = 0, Blue = 0 }; fillSymbol.Color = red; fillSymbol.Style = esriSimpleFillStyle.esriSFSSolid; IGraphicTrackerSymbol graphicTrackerSymbol = graphicTracker.CreateSymbol(fillSymbol as ISymbol, null); PointClass centroid = new PointClass(); PointClass fromPoint = new PointClass(); PointClass toPoint = new PointClass(); centroid.PutCoords(0, 0); fromPoint.PutCoords(0, 10); toPoint.PutCoords(10, 0); CircularArcClass circularArc = new CircularArcClass(); circularArc.PutCoords(centroid, fromPoint, toPoint, esriArcOrientation.esriArcClockwise); int graphicID = graphicTracker.Add(circularArc, graphicTrackerSymbol); mapControl.Refresh();
ICharacterMarkerSymbol charSymbol = new CharacterMarkerSymbolClass(); charSymbol.CharacterIndex = 122; charSymbol.Color = new RgbColorClass() { Red = 15, Green = 255, Blue = 255 }; charSymbol.Font = tactFont; charSymbol.Size = 36; charSymbol.XOffset = 0; charSymbol.YOffset = 0; PointClass offset = new PointClass() { X = 0, Y = 0 }; IGraphicTrackerSymbol graphicTrackerSymbol = graphicTracker.CreateSymbol(charSymbol as ISymbol, null); int graphicID = graphicTracker.Add(offset, graphicTrackerSymbol);
CartographicLineSymbolClass cartoSymbol = new CartographicLineSymbolClass(); cartoSymbol.Color = new RgbColorClass() { Red = 0, Green = 0, Blue = 255 }; cartoSymbol.Cap = esriLineCapStyle.esriLCSButt; cartoSymbol.Join = esriLineJoinStyle.esriLJSBevel; cartoSymbol.Width = 2; PointClass p1 = new PointClass() {X = 0, Y = 10}; PointClass p2 = new PointClass() {X = 10, Y = 0}; ILine line = new LineClass(); line.PutCoords(p1, p2); IEnvelope env = new EnvelopeClass() { XMin = -10, XMax = 10, YMin = -10, YMax = 10 }; IGraphicTrackerSymbol graphicTrackerSymbol = graphicTracker.CreateSymbol(cartoSymbol as ISymbol, null); int graphicID = graphicTracker.Add(env, graphicTrackerSymbol);
Solved! Go to Solution.
IPolyline polyline = new PolylineClass(); ISegmentCollection segmentCollection = polyline as ISegmentCollection; segmentCollection.AddSegment(circularArc); ISymbol targetSymbol = (ISymbol)polyline;
ISimpleFillSymbol fillSymbol = new SimpleFillSymbolClass(); RgbColorClass red = new RgbColorClass() { Red = 255, Green = 0, Blue = 0 }; fillSymbol.Color = red; fillSymbol.Style = esriSimpleFillStyle.esriSFSSolid; PointClass centroid = new PointClass(); PointClass fromPoint = new PointClass(); PointClass toPoint = new PointClass(); centroid.PutCoords(0, 0); fromPoint.PutCoords(0, 10); toPoint.PutCoords(10, 0); CircularArcClass circularArc = new CircularArcClass(); circularArc.PutCoords(centroid, fromPoint, toPoint, esriArcOrientation.esriArcClockwise); IPolyline polyline = new PolylineClass(); ISegmentCollection segmentCollection = polyline as ISegmentCollection; segmentCollection.AddSegment(circularArc); IGraphicTrackerSymbol graphicTrackerSymbol = graphicTracker.CreateSymbol(fillSymbol as ISymbol, null); int graphicID = graphicTracker.Add(polyline, graphicTrackerSymbol);
IGraphicTrackerSymbol graphicTrackerSymbol = graphicTracker.CreateSymbol(lineSymbol as ISymbol, null); int graphicID = graphicTracker.Add(polyline, graphicTrackerSymbol);