Ejemplo n.º 1
0
        private ValueRenderStruct ExportValueRender(MapObjects2.ValueMapRenderer render)
        {
            ValueRenderStruct oValueRender = new ValueRenderStruct();

            this.DeconvertSymbol(render.DefaultSymbol, oValueRender.DefaultSymbol);

            oValueRender.Field         = render.Field;
            oValueRender.RotationField = render.RotationField;
            oValueRender.ScaleField    = render.ScalingField;
            oValueRender.SymbolType    = (short)render.SymbolType;
            oValueRender.Tag           = render.Tag;
            oValueRender.UseDefault    = render.UseDefault;
            oValueRender.ValueCount    = render.ValueCount;

            short iIndex = 0;

            MapObjects2.Symbol oMapSymbol = render.get_Symbol(iIndex);

            while (oMapSymbol != null)
            {
                SymbolStruct oSymbol = new SymbolStruct();
                this.DeconvertSymbol(oMapSymbol, oSymbol);
                oValueRender.SymbolList.Add(oSymbol);

                iIndex++;
                oMapSymbol = render.get_Symbol(iIndex);
            }

            return(oValueRender);
        }
Ejemplo n.º 2
0
 public void ConvertSymbol(SymbolStruct fromSymbol,MapObjects2.Symbol toSymbol)
 {
     toSymbol.CenterOnAscent = fromSymbol.CenterOnAscent;
     toSymbol.CharacterIndex = fromSymbol.CharacterIndex;
     toSymbol.Color = Convert.ToUInt32(fromSymbol.FillColor.ToArgb());
     toSymbol.Custom = fromSymbol.CustomSymbol;
     toSymbol.Font.Name = fromSymbol.FontName;
     toSymbol.Outline = fromSymbol.OutLine;
     toSymbol.OutlineColor = Convert.ToUInt32(fromSymbol.OutLineColor.ToArgb());
     toSymbol.Rotation = fromSymbol.Rotation;
     toSymbol.Size = fromSymbol.Size;
     toSymbol.Style = fromSymbol.Style;
     toSymbol.SymbolType = (MapObjects2.SymbolTypeConstants)fromSymbol.SymbolType;
 }
Ejemplo n.º 3
0
 private void DeconvertSymbol(MapObjects2.Symbol fromSymbol, SymbolStruct toSymbol)
 {
     toSymbol.CenterOnAscent = fromSymbol.CenterOnAscent;
     toSymbol.CharacterIndex = fromSymbol.CharacterIndex;
     toSymbol.FillColor      = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.Color);
     toSymbol.CustomSymbol   = fromSymbol.Custom;
     toSymbol.FontName       = fromSymbol.Font.Name;
     toSymbol.OutLine        = fromSymbol.Outline;
     toSymbol.OutLineColor   = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.OutlineColor);
     toSymbol.Rotation       = fromSymbol.Rotation;
     toSymbol.Size           = fromSymbol.Size;
     toSymbol.Style          = fromSymbol.Style;
     toSymbol.SymbolType     = (short)fromSymbol.SymbolType;
 }
Ejemplo n.º 4
0
 public void ConvertSymbol(SymbolStruct fromSymbol, MapObjects2.Symbol toSymbol)
 {
     toSymbol.CenterOnAscent = fromSymbol.CenterOnAscent;
     toSymbol.CharacterIndex = fromSymbol.CharacterIndex;
     toSymbol.Color          = Convert.ToUInt32(fromSymbol.FillColor.ToArgb());
     toSymbol.Custom         = fromSymbol.CustomSymbol;
     toSymbol.Font.Name      = fromSymbol.FontName;
     toSymbol.Outline        = fromSymbol.OutLine;
     toSymbol.OutlineColor   = Convert.ToUInt32(fromSymbol.OutLineColor.ToArgb());
     toSymbol.Rotation       = fromSymbol.Rotation;
     toSymbol.Size           = fromSymbol.Size;
     toSymbol.Style          = fromSymbol.Style;
     toSymbol.SymbolType     = (MapObjects2.SymbolTypeConstants)fromSymbol.SymbolType;
 }
Ejemplo n.º 5
0
        private ValueRenderStruct ExportValueRender(MapObjects2.ValueMapRenderer render)
        {
            ValueRenderStruct oValueRender = new ValueRenderStruct();

            this.DeconvertSymbol(render.DefaultSymbol, oValueRender.DefaultSymbol);

            oValueRender.Field = render.Field;
            oValueRender.RotationField = render.RotationField;
            oValueRender.ScaleField = render.ScalingField;
            oValueRender.SymbolType = (short)render.SymbolType;
            oValueRender.Tag = render.Tag;
            oValueRender.UseDefault = render.UseDefault;
            oValueRender.ValueCount = render.ValueCount;

            short iIndex = 0;
            MapObjects2.Symbol oMapSymbol = render.get_Symbol(iIndex);

            while (oMapSymbol != null)
            {
                SymbolStruct oSymbol = new SymbolStruct();
                this.DeconvertSymbol(oMapSymbol, oSymbol);
                oValueRender.SymbolList.Add(oSymbol);

                iIndex++;
                oMapSymbol = render.get_Symbol(iIndex);
            }

            return oValueRender;
        }
Ejemplo n.º 6
0
 private void DeconvertSymbol(MapObjects2.Symbol fromSymbol, SymbolStruct toSymbol)
 {
     toSymbol.CenterOnAscent = fromSymbol.CenterOnAscent;
     toSymbol.CharacterIndex = fromSymbol.CharacterIndex;
     toSymbol.FillColor = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.Color);
     toSymbol.CustomSymbol = fromSymbol.Custom;
     toSymbol.FontName = fromSymbol.Font.Name;
     toSymbol.OutLine = fromSymbol.Outline;
     toSymbol.OutLineColor = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.OutlineColor);
     toSymbol.Rotation = fromSymbol.Rotation;
     toSymbol.Size = fromSymbol.Size;
     toSymbol.Style = fromSymbol.Style;
     toSymbol.SymbolType = (short)fromSymbol.SymbolType;
 }