Skip to main content
2 of 2
edited tags
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

ArcObjects - Create and Draw a Transparent Polygon

I'm trying to create a transparent Polygon in ArcMap; however, it's never transparent. Here's the code I have.

// Create polygon
IPolygon polygon = new PolygonClass();
// create & add points,......

// Create lineSymbol
ISimpleLineSymbol lineSymbol = new SimpleLineSymbolClass();
// set color & style,....

// Create fillSymbol
ISimpleFillSymbol fillSymbol = new SimpleFillSymbolClass();
fillSymbol.Outline = lineSymbol;
fillSymbol.Color = //set to color red//;
fillSymbol.Color.Transparent = 0;
fillSymbol.Style = esriSimpleFillStyle.esriSFSSolid;

// Draw Shape
myMap.DrawShape(polygon, fillSymbol);

RESULT ==> A solid red polygon is drawn. The Transparent setting is ignored.

Thoughts?

ist_lion
  • 511
  • 1
  • 4
  • 16