问题描述
//定义的带箭头的线IGeometrypGeometry=axMapControl1.TrackLine();IRgbColorpColor=newRgbColorClass();pColor.Red=255;ICartographicLineSymbolpCartoLineSymbol=newCartographicLineSymbolClass();pCartoLineSymbol.Cap=esriLineCapStyle.esriLCSRound;ILinePropertiespLineProp=pCartoLineSymbolasILineProperties;pLineProp.DecorationOnTop=true;ILineDecorationpLineDecoration=newLineDecorationClass();ISimpleLineDecorationElementpSimpleLineDecoElem=newSimpleLineDecorationElementClass();pSimpleLineDecoElem.AddPosition(1);//确定箭头位置:0在末端,1在顶端IArrowMarkerSymbolpArrowMarkerSym=newArrowMarkerSymbolClass();pArrowMarkerSym.Size=5;pArrowMarkerSym.Color=pColor;pSimpleLineDecoElem.MarkerSymbol=pArrowMarkerSymasIMarkerSymbol;pLineDecoration.AddElement(pSimpleLineDecoElemasILineDecorationElement);pLineProp.LineDecoration=pLineDecoration;ILineSymbolpLineSymbol=pCartoLineSymbolasILineSymbol;pLineSymbol.Color=pColor;pLineSymbol.Width=2;ILineElementpLineElem=newLineElementClass();pLineElem.Symbol=pLineSymbol;IElementpElem=pLineElemasIElement;pElem.Geometry=pGeometry;IGraphicsContainerpGraphicsContainer=axMapControl1.MapasIGraphicsContainer;pGraphicsContainer.AddElement(pElem,0);axMapControl1.Refresh();例如我想画一个(0,0)→(1,-1)的箭头,该怎么弄?