<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problems making polygon line color solid when fill color is semi-transparent in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-making-polygon-line-color-solid-when-fill/m-p/64518#M1742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I am using Java ArcObjects and ArcGIS 10 to create some layers and add them to a map document.&amp;nbsp; After I create my feature layer, I use the layer's SimpleRenderer to set the symbology (fill color, fill opacity, line color) like:&lt;/P&gt;&lt;P&gt;-----------------------------------------------&lt;/P&gt;&lt;P&gt;SimpleRenderer sr = (SimpleRenderer) featurelayer.getRenderer();&lt;/P&gt;&lt;P&gt;ISymbol sym = sr.getSymbol();&lt;/P&gt;&lt;P&gt;SimpleFillSymbol sfs = (SimpleFillsymbol) sym;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IRgbColor rgb = new RGBColor();&lt;/P&gt;&lt;P&gt;rgb.setRed(RR);&lt;/P&gt;&lt;P&gt;rgb.setGrenn(GG);&lt;/P&gt;&lt;P&gt;rgb.setBlue(BB);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;rgb.setTransparency((byte)128&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sfs.setColor(rgb);&lt;/P&gt;&lt;P&gt;ILineSymbol ls = new SimpleLineSymbol();&lt;/P&gt;&lt;P&gt;ls.setWidth(1);&lt;/P&gt;&lt;P&gt;ls.setColor(blackColor);&lt;/P&gt;&lt;P&gt;sfs.setOutline(ls);&lt;/P&gt;&lt;P&gt;--------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; That did not happend.&amp;nbsp; The color is displayed correctly but the fill is fully opaque.&amp;nbsp; In order to get the semi-transparency, I had to add the following to the feature layer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;featurelayer.setTransparency((short)80);&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; Setting the transparency on the color requires a byte whereas setting the transparency on the layer requires a short.&amp;nbsp; 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.&amp;nbsp; Any thoughts on what I may be missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2014 13:07:36 GMT</pubDate>
    <dc:creator>PeterLen</dc:creator>
    <dc:date>2014-08-06T13:07:36Z</dc:date>
    <item>
      <title>Problems making polygon line color solid when fill color is semi-transparent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-making-polygon-line-color-solid-when-fill/m-p/64518#M1742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I am using Java ArcObjects and ArcGIS 10 to create some layers and add them to a map document.&amp;nbsp; After I create my feature layer, I use the layer's SimpleRenderer to set the symbology (fill color, fill opacity, line color) like:&lt;/P&gt;&lt;P&gt;-----------------------------------------------&lt;/P&gt;&lt;P&gt;SimpleRenderer sr = (SimpleRenderer) featurelayer.getRenderer();&lt;/P&gt;&lt;P&gt;ISymbol sym = sr.getSymbol();&lt;/P&gt;&lt;P&gt;SimpleFillSymbol sfs = (SimpleFillsymbol) sym;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IRgbColor rgb = new RGBColor();&lt;/P&gt;&lt;P&gt;rgb.setRed(RR);&lt;/P&gt;&lt;P&gt;rgb.setGrenn(GG);&lt;/P&gt;&lt;P&gt;rgb.setBlue(BB);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;rgb.setTransparency((byte)128&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sfs.setColor(rgb);&lt;/P&gt;&lt;P&gt;ILineSymbol ls = new SimpleLineSymbol();&lt;/P&gt;&lt;P&gt;ls.setWidth(1);&lt;/P&gt;&lt;P&gt;ls.setColor(blackColor);&lt;/P&gt;&lt;P&gt;sfs.setOutline(ls);&lt;/P&gt;&lt;P&gt;--------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; That did not happend.&amp;nbsp; The color is displayed correctly but the fill is fully opaque.&amp;nbsp; In order to get the semi-transparency, I had to add the following to the feature layer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;featurelayer.setTransparency((short)80);&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; Setting the transparency on the color requires a byte whereas setting the transparency on the layer requires a short.&amp;nbsp; 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.&amp;nbsp; Any thoughts on what I may be missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 13:07:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-making-polygon-line-color-solid-when-fill/m-p/64518#M1742</guid>
      <dc:creator>PeterLen</dc:creator>
      <dc:date>2014-08-06T13:07:36Z</dc:date>
    </item>
  </channel>
</rss>

