ArcGIS Engine之設定圓形,矩形,多邊形的屬性

摘要:ArcGIS Engine之設定圓形,矩形,多邊形的屬性

01 IGraphicsContainerSelect^ gcs = (IGraphicsContainerSelect^)this->axMapControl1->Map ;
02
03   if (gcs->ElementSelectionCount==1)
04 {
05     IElement^ ele = gcs->SelectedElement(0) ;
06   
07     IFillShapeElement^ shape = (IFillShapeElement^)ele ;
08   
09     ISimpleFillSymbol^ simSymbol = gcnew SimpleFillSymbolClass() ;
10     ILineSymbol^ lineSymbol = gcnew SimpleLineSymbolClass();
11
12     IColor^ rgb = gcnew RgbColorClass() ;
13     rgb->Transparency = 0 ;
14
15     IColor^ rgbLine = gcnew RgbColorClass() ;
16     rgb->RGB = 128 ;
17
18     lineSymbol->Color = rgbLine ;
19     lineSymbol->Width = 1 ;
20     
21     simSymbol->Color = rgb;
22     simSymbol->Style = esriSimpleFillStyle::esriSFSHollow ;
23     simSymbol->Outline = lineSymbol ;
24
25     shape->Symbol = simSymbol ;
26
27     IActiveView^ av = this->axMapControl1->ActiveView ;
28     av->Refresh();
29     }

30