void IFeatureRenderer.Draw(ESRI.ArcGIS.Geodatabase.IFeatureCursor Cursor, ESRI.ArcGIS.esriSystem.esriDrawPhase DrawPhase, IDisplay Display, ESRI.ArcGIS.esriSystem.ITrackCancel TrackCancel)
        {
            // do not draw features if no display
            if (Display == null)
            {
                return;
            }
            else
            {
                clsSnippet pSnippet = new clsSnippet();
                IFeature   pFeat    = null;

                intBrksCount = pCSMembers.ClassBrks.Length - 1;
                ISimpleFillSymbol pSFillSym = new SimpleFillSymbolClass();

                ICartographicLineSymbol pOutLines = new CartographicLineSymbol();
                pOutLines.Width = dblLineWidth;
                pOutLines.Color = (IColor)pLineRgb;

                pFeat = Cursor.NextFeature();
                IRgbColor pRGBColor = null;
                int       i         = 0;
                double    dblValue  = 0;

                //Start Loop
                while (pFeat != null)
                {
                    dblValue = Convert.ToDouble(pFeat.get_Value(intEstIdx));
                    IFeatureDraw pFeatDraw = (IFeatureDraw)pFeat;
                    pSFillSym         = new SimpleFillSymbolClass();
                    pSFillSym.Outline = pOutLines;
                    pRGBColor         = null;

                    for (int j = 0; j < intBrksCount; j++)
                    {
                        if (j == 0)
                        {
                            if (dblValue >= pCSMembers.ClassBrks[0] && dblValue <= pCSMembers.ClassBrks[1])
                            {
                                pRGBColor = pSnippet.getRGB(pCSMembers.Colors[0, 0], pCSMembers.Colors[0, 1], pCSMembers.Colors[0, 2]);
                            }
                        }
                        else
                        {
                            if (dblValue > pCSMembers.ClassBrks[j] && dblValue <= pCSMembers.ClassBrks[j + 1])
                            {
                                pRGBColor = pSnippet.getRGB(pCSMembers.Colors[j, 0], pCSMembers.Colors[j, 1], pCSMembers.Colors[j, 2]);
                            }
                        }
                    }
                    pSFillSym.Color = (IColor)pRGBColor;
                    Display.SetSymbol((ISymbol)pSFillSym);
                    pFeatDraw.Draw(esriDrawPhase.esriDPGeography, Display, (ISymbol)pSFillSym, true,
                                   null, esriDrawStyle.esriDSNormal);
                    i++;
                    pFeat = Cursor.NextFeature();
                }
            }
        }
Exemple #2
0
        void IFeatureRenderer.Draw(ESRI.ArcGIS.Geodatabase.IFeatureCursor Cursor, ESRI.ArcGIS.esriSystem.esriDrawPhase DrawPhase, IDisplay Display, ESRI.ArcGIS.esriSystem.ITrackCancel TrackCancel)
        {
            // do not draw features if no display
            if (Display == null)
            {
                return;
            }
            else
            {
                IFeature pFeat = null;

                intBrksCount = arrClassBrks.Length - 1;
                ILineFillSymbol pLineFillSym = new LineFillSymbolClass();
                pFeat         = Cursor.NextFeature();
                dblInstantSep = (dblFromSep - dblToSep) / Convert.ToDouble(intBrksCount - 1);

                int i = 0;
                //Start Loop
                while (pFeat != null)
                {
                    IFeatureDraw pFeatDraw = (IFeatureDraw)pFeat;
                    pLineFillSym                  = new LineFillSymbolClass();
                    pLineFillSym.Angle            = dblLineAngle;
                    pLineFillSym.Color            = pLineRgb;
                    pLineFillSym.LineSymbol.Width = dblLineWidth;

                    for (int j = 0; j < intBrksCount; j++)
                    {
                        if (arrValue[i] >= arrClassBrks[j] && arrValue[i] <= arrClassBrks[j + 1])
                        {
                            pLineFillSym.Separation = dblToSep + (dblInstantSep * Convert.ToDouble(j));
                        }
                    }

                    Display.SetSymbol((ISymbol)pLineFillSym);
                    pFeatDraw.Draw(esriDrawPhase.esriDPGeography, Display, (ISymbol)pLineFillSym, true,
                                   null, esriDrawStyle.esriDSNormal);
                    i++;
                    pFeat = Cursor.NextFeature();
                }
            }
        }
Exemple #3
0
 bool IFeatureRenderer.get_RenderPhase(ESRI.ArcGIS.esriSystem.esriDrawPhase DrawPhase)
 {
     return(DrawPhase == esriDrawPhase.esriDPGeography);
 }