Beispiel #1
0
 public void ConvertTextSymbol(TextSymbolStruct fromSymbol, MapObjects2.TextSymbol toSymbol)
 {
     toSymbol.Color = (uint)fromSymbol.TextColor.ToArgb();
     toSymbol.Fitted = fromSymbol.Fitted;
     toSymbol.Font = fromSymbol.TextFont;
     toSymbol.Height = fromSymbol.Height;
     toSymbol.HorizontalAlignment = (MapObjects2.AlignmentConstants)fromSymbol.HorizontalAlignment;
     toSymbol.VerticalAlignment = (MapObjects2.AlignmentConstants)fromSymbol.VerticalAlignment;
     toSymbol.Rotation = fromSymbol.Rotation;
 }
Beispiel #2
0
 private void DeconvertTextSymbol(MapObjects2.TextSymbol fromSymbol, TextSymbolStruct toSymbol)
 {
     toSymbol.TextColor           = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.Color);
     toSymbol.Fitted              = fromSymbol.Fitted;
     toSymbol.TextFont            = fromSymbol.Font;
     toSymbol.Height              = fromSymbol.Height;
     toSymbol.HorizontalAlignment = (short)fromSymbol.HorizontalAlignment;
     toSymbol.VerticalAlignment   = (short)fromSymbol.VerticalAlignment;
     toSymbol.Rotation            = fromSymbol.Rotation;
 }
Beispiel #3
0
 public void ConvertTextSymbol(TextSymbolStruct fromSymbol, MapObjects2.TextSymbol toSymbol)
 {
     toSymbol.Color  = (uint)fromSymbol.TextColor.ToArgb();
     toSymbol.Fitted = fromSymbol.Fitted;
     toSymbol.Font   = fromSymbol.TextFont;
     toSymbol.Height = fromSymbol.Height;
     toSymbol.HorizontalAlignment = (MapObjects2.AlignmentConstants)fromSymbol.HorizontalAlignment;
     toSymbol.VerticalAlignment   = (MapObjects2.AlignmentConstants)fromSymbol.VerticalAlignment;
     toSymbol.Rotation            = fromSymbol.Rotation;
 }
Beispiel #4
0
        private LabelRenderStruct ExportLabelRender(MapObjects2.LabelRenderer render)
        {
            LabelRenderStruct oLabelRender = new LabelRenderStruct();

            oLabelRender.AllowDuplicates = render.AllowDuplicates;
            oLabelRender.DrawBackground  = render.DrawBackground;
            oLabelRender.Field           = render.Field;
            oLabelRender.FittedField     = render.FittedField;
            oLabelRender.Flip            = render.Flip;
            oLabelRender.HeightField     = render.HeightField;
            oLabelRender.LevelField      = render.LevelField;
            oLabelRender.MaxLevel        = render.MaxLevel;
            oLabelRender.MinLevel        = render.MinLevel;
            oLabelRender.RotationField   = render.RotationField;
            oLabelRender.SplinedText     = render.SplinedText;
            oLabelRender.SymbolCount     = render.SymbolCount;
            oLabelRender.SymbolField     = render.SymbolField;
            oLabelRender.Tag             = render.Tag;
            oLabelRender.XOffsetField    = render.XOffsetField;
            oLabelRender.YOffsetField    = render.YOffsetField;

            short iIndex = 0;

            MapObjects2.TextSymbol oMapTextSymbol = render.get_Symbol(iIndex);

            while (oMapTextSymbol != null)
            {
                TextSymbolStruct oTextSymbol = new TextSymbolStruct();
                this.DeconvertTextSymbol(oMapTextSymbol, oTextSymbol);
                oLabelRender.SymbolList.Add(oTextSymbol);

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

            return(oLabelRender);
        }
Beispiel #5
0
        private LabelRenderStruct ExportLabelRender(MapObjects2.LabelRenderer render)
        {
            LabelRenderStruct oLabelRender = new LabelRenderStruct();

            oLabelRender.AllowDuplicates = render.AllowDuplicates;
            oLabelRender.DrawBackground = render.DrawBackground;
            oLabelRender.Field = render.Field;
            oLabelRender.FittedField = render.FittedField;
            oLabelRender.Flip = render.Flip;
            oLabelRender.HeightField = render.HeightField;
            oLabelRender.LevelField = render.LevelField;
            oLabelRender.MaxLevel = render.MaxLevel;
            oLabelRender.MinLevel = render.MinLevel;
            oLabelRender.RotationField = render.RotationField;
            oLabelRender.SplinedText = render.SplinedText;
            oLabelRender.SymbolCount = render.SymbolCount;
            oLabelRender.SymbolField = render.SymbolField;
            oLabelRender.Tag = render.Tag;
            oLabelRender.XOffsetField = render.XOffsetField;
            oLabelRender.YOffsetField = render.YOffsetField;

            short iIndex = 0;
            MapObjects2.TextSymbol oMapTextSymbol = render.get_Symbol(iIndex);

            while (oMapTextSymbol != null)
            {
                TextSymbolStruct oTextSymbol = new TextSymbolStruct();
                this.DeconvertTextSymbol(oMapTextSymbol, oTextSymbol);
                oLabelRender.SymbolList.Add(oTextSymbol);

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

            return oLabelRender;
        }
Beispiel #6
0
 private void DeconvertTextSymbol(MapObjects2.TextSymbol fromSymbol, TextSymbolStruct toSymbol)
 {
     toSymbol.TextColor = System.Drawing.ColorTranslator.FromWin32((int)fromSymbol.Color);
     toSymbol.Fitted = fromSymbol.Fitted;
     toSymbol.TextFont = fromSymbol.Font;
     toSymbol.Height = fromSymbol.Height;
     toSymbol.HorizontalAlignment = (short)fromSymbol.HorizontalAlignment;
     toSymbol.VerticalAlignment = (short)fromSymbol.VerticalAlignment;
     toSymbol.Rotation = fromSymbol.Rotation;
 }