コード例 #1
0
        public MapObjects2.LabelRenderer GetLabelRender(LabelRenderStruct render)
        {
            MapObjects2.LabelRenderer oMapRender = new MapObjects2.LabelRendererClass();

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

            short iIndex = 0;

            foreach (TextSymbolStruct oSymbol in render.SymbolList)
            {
                MapObjects2.TextSymbol otext = new MapObjects2.TextSymbol();
                this.ConvertTextSymbol(oSymbol, oMapRender.get_Symbol(iIndex));

                iIndex++;
            }

            return(oMapRender);
        }
コード例 #2
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++;

                try
                {
                    oMapTextSymbol = render.get_Symbol(iIndex);
                }
                catch
                {
                    break;
                }
            }

            return(oLabelRender);
        }
コード例 #3
0
        private GroupRenderStruct ExportGroupRender(MapObjects2.GroupRenderer render)
        {
            GroupRenderStruct oGroupRender = new GroupRenderStruct();
            short             iIndex       = 0;

            oGroupRender.DrawBackground = render.DrawBackground;
            oGroupRender.Tag            = render.Tag;

            object oMapSubRender = render.get_Renderer(iIndex);

            while (oMapSubRender != null)
            {
                if (oMapSubRender is MapObjects2.ValueMapRenderer)
                {
                    ValueRenderStruct oValueRender = this.ExportValueRender(oMapSubRender as MapObjects2.ValueMapRenderer);
                    oGroupRender.RenderList.Add(oValueRender);
                }
                else if (oMapSubRender is MapObjects2.ClassBreaksRenderer)
                {
                    ClassBreakRenderStruct oClassBreakRender = this.ExportClassBreakRender(oMapSubRender as MapObjects2.ClassBreaksRenderer);
                    oGroupRender.RenderList.Add(oClassBreakRender);
                }
                else if (oMapSubRender is MapObjects2.LabelRenderer)
                {
                    LabelRenderStruct oLabelRender = this.ExportLabelRender(oMapSubRender as MapObjects2.LabelRenderer);
                    oGroupRender.RenderList.Add(oLabelRender);
                }

                iIndex++;

                try
                {
                    oMapSubRender = render.get_Renderer(iIndex);
                }
                catch
                {
                    break;
                }
            }


            return(oGroupRender);
        }