AnsweredAssumed Answered

Problems making polygon line color solid when fill color is semi-transparent

Question asked by peterlen on Aug 6, 2014

Hello - I am using Java ArcObjects and ArcGIS 10 to create some layers and add them to a map document.  After I create my feature layer, I use the layer's SimpleRenderer to set the symbology (fill color, fill opacity, line color) like:


SimpleRenderer sr = (SimpleRenderer) featurelayer.getRenderer();

ISymbol sym = sr.getSymbol();

SimpleFillSymbol sfs = (SimpleFillsymbol) sym;


IRgbColor rgb = new RGBColor();







ILineSymbol ls = new SimpleLineSymbol();






In the above code I though that if I set the transparency of the polygon's fill color, that the n the map with a semi-transparent fill.  That did not happend.  The color is displayed correctly but the fill is fully opaque.  In order to get the semi-transparency, I had to add the following to the feature layer:




The problem with this is that by setting the transparency on the layer, it also gives a transparency to the polygon border color, which I don't want.  Setting the transparency on the color requires a byte whereas setting the transparency on the layer requires a short.  Not sure what the difference is there but for some reason I can't seem to get the transparency recognized when I just apply it to the fill color.  Any thoughts on what I may be missing?


Thanks - Peter