yushff

code the world。

导航

ArcGIS Engine9.2 栅格图层的透明度设置

Posted on 2010-04-21 09:47  yushff  阅读(1166)  评论(4编辑  收藏  举报

代码如下:

定义ILayerEffects 类型变量,然后获得图层,然后设置,更新,完成图层的透明度设置。

 

                    ILayerEffects pLayerEffects;
                    pLayerEffects = (ILayerEffects)_frmMain.pCurrentMap.Map.get_Layer(0);

                    if (pLayerEffects.SupportsTransparency == true)
                    {
                        pLayerEffects.Transparency = 35;
                    }
                    _frmMain.pCurrentMap.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);