/// <summary> /// Class default constructor /// </summary> public GlobeCustomLayerBase() { m_sName = string.Empty; m_bVisible = true; m_bValid = true; m_bCached = false; m_dblMaxScale = 0; m_dblMinScale = 0; m_table = new DataTable("RECORDS"); m_table.Columns.Add("ID", typeof(long)); m_extensions = new ArrayList(); ILegendClass legendClass = new LegendClassClass(); legendClass.Label = "GlobeCustomLayer"; m_legendGroup = new LegendGroupClass(); m_legendGroup.Heading = ""; m_legendGroup.Editable = false; m_legendGroup.AddClass(legendClass); m_sName = "GlobeCustomLayer"; //call CreateControl in order to create the handle this.CreateControl(); }
public VerySimpleCustomRenderer() { lg = new LegendGroupClass(); ILegendClass lc = new LegendClassClass(); sym = new SimpleFillSymbolClass(); lc.Label = "A very simple custom renderer"; lc.Symbol = sym; lg.AddClass(lc); }
//Create Legend public void CreateLegend() { clsSnippet pSnippet = new clsSnippet(); //Create Legend Group m_pLegendGroup = new LegendGroup(); m_pLegendGroup.Heading = "Robustness"; m_pLegendGroup.Editable = true; m_pLegendGroup.Visible = true; //For Values ILegendClass legendClass = new LegendClass(); ILineFillSymbol pLineFillSym = new LineFillSymbolClass(); double dblInstantSep = (dblFromSep - dblToSep) / Convert.ToDouble(intUncernBreakCount - 2); for (int i = 0; i < intUncernBreakCount; i++) { legendClass = new LegendClass(); if (i == intUncernBreakCount - 1) { legendClass.Label = "1"; } else if (i == intUncernBreakCount - 2) { legendClass.Label = arrRobustBrks[i].ToString() + " - " + (1 - (1 * Math.Pow(0.1, intRoundingDigits))).ToString(); } else { legendClass.Label = arrRobustBrks[i].ToString() + " - " + (arrRobustBrks[i + 1] - (1 * Math.Pow(0.1, intRoundingDigits))).ToString(); } pLineFillSym = new LineFillSymbolClass(); pLineFillSym.Angle = dblAngle; pLineFillSym.Color = pLineColor; pLineFillSym.LineSymbol.Width = dblLinewidth; if (i == (intUncernBreakCount - 1)) { pLineFillSym.Separation = double.MaxValue; } else { pLineFillSym.Separation = dblToSep + (dblInstantSep * Convert.ToDouble(i)); } legendClass.Symbol = pLineFillSym as ISymbol; m_pLegendGroup.AddClass(legendClass); } }
void ISpacingBreaksRenderer.CreateLegend() { //Create Legend Group m_pLegendGroup = new LegendGroup(); m_pLegendGroup.Heading = strHeading; m_pLegendGroup.Editable = true; m_pLegendGroup.Visible = true; intBrksCount = arrClassBrks.Length - 1; dblInstantSep = (dblFromSep - dblToSep) / Convert.ToDouble(intBrksCount - 1); //For Values ILegendClass legendClass = new LegendClass(); ILineFillSymbol pLineFillSym = new LineFillSymbolClass(); for (int i = 0; i < intBrksCount; i++) { legendClass = new LegendClass(); //if (i == intUncernBreakCount - 1) // legendClass.Label = "1"; //else if (i == intUncernBreakCount - 2) // legendClass.Label = arrClassBrks[i].ToString() + " - " + (1 - (1 * Math.Pow(0.1, intRoundingDigits))).ToString(); //else legendClass.Label = Math.Round(arrClassBrks[i], intRoundingDigits).ToString() + " - " + (Math.Round(arrClassBrks[i + 1], intRoundingDigits) - (1 * Math.Pow(0.1, intRoundingDigits))).ToString(); pLineFillSym = new LineFillSymbolClass(); pLineFillSym.Angle = dblLineAngle; pLineFillSym.Color = pLineRgb; pLineFillSym.LineSymbol.Width = dblLineWidth; pLineFillSym.Separation = dblToSep + (dblInstantSep * Convert.ToDouble(i)); legendClass.Symbol = pLineFillSym as ISymbol; m_pLegendGroup.AddClass(legendClass); } }
//Create Legend public void CreateLegend() { clsSnippet pSnippet = new clsSnippet(); //Create Legend Group m_pLegendGroup = new LegendGroup(); m_pLegendGroup.Heading = m_strOriRenderField; m_pLegendGroup.Editable = true; m_pLegendGroup.Visible = true; ILegendClass legendClass = new LegendClass(); legendClass.Label = Math.Round(dblMaxValue, 0).ToString(); IStackedChartSymbol stackedChartSymbol = new StackedChartSymbolClass(); //IBarChartSymbol barChartSymbol = new BarChartSymbolClass(); stackedChartSymbol.Width = 10; if (bln3Dfeature) { I3DChartSymbol p3DChartSymbol = stackedChartSymbol as I3DChartSymbol; p3DChartSymbol.Display3D = true; p3DChartSymbol.Thickness = 3; } //IMarkerSymbol markerSymbol = stackedChartSymbol as IMarkerSymbol; //markerSymbol.Size = 50; IChartSymbol chartSymbol = stackedChartSymbol as IChartSymbol; chartSymbol.MaxValue = dblMaxValue; ISymbolArray symbolArray = stackedChartSymbol as ISymbolArray; //Stacked Symbol IFillSymbol fillSymbol = new SimpleFillSymbolClass(); fillSymbol.Color = pSnippet.getRGB(255, 0, 0); fillSymbol.Outline.Color = pSnippet.getRGB(0, 0, 0); symbolArray.AddSymbol(fillSymbol as ISymbol); chartSymbol.set_Value(0, dblMaxUncern); //fillSymbol = new SimpleFillSymbolClass(); //fillSymbol.Color = pSnippet.getRGB(255, 0, 0); //fillSymbol.Outline.Color = pSnippet.getRGB(0, 0, 0); //symbolArray.AddSymbol(fillSymbol as ISymbol); //chartSymbol.set_Value(1, dblMaxUncern); fillSymbol = new SimpleFillSymbolClass(); fillSymbol.Color = pSnippet.getRGB(255, 255, 255); fillSymbol.Outline.Color = pSnippet.getRGB(0, 0, 0); symbolArray.AddSymbol(fillSymbol as ISymbol); chartSymbol.set_Value(1, dblMaxEstimate - dblMaxUncern); legendClass.Symbol = (ISymbol)chartSymbol; m_pLegendGroup.AddClass(legendClass); //Bounds legendClass = new LegendClass(); legendClass.Label = "Upper Bound"; ISimpleFillSymbol pLegendUncerSymbol = new SimpleFillSymbol(); pLegendUncerSymbol.Color = pSnippet.getRGB(0, 0, 255); pLegendUncerSymbol.Outline.Color = pSnippet.getRGB(0, 0, 0); legendClass.Symbol = (ISymbol)pLegendUncerSymbol; m_pLegendGroup.AddClass(legendClass); legendClass = new LegendClass(); legendClass.Label = "Lower Bound"; pLegendUncerSymbol = new SimpleFillSymbol(); pLegendUncerSymbol.Color = pSnippet.getRGB(255, 0, 0); pLegendUncerSymbol.Outline.Color = pSnippet.getRGB(0, 0, 0); legendClass.Symbol = (ISymbol)pLegendUncerSymbol; m_pLegendGroup.AddClass(legendClass); }