Пример #1
0
        protected override void InnerDraw(GeoStarCore.geoDrawPhase drawPhase, GeoStarCore.IDisplay pDisplay, GeoStarCore.ITrackCancel pTrack)
        {
            if (m_TileList.Count == 0)
            {
                return;
            }
            List <QuadTile> vList = new List <QuadTile>();

            lock (this)
            {
                vList.AddRange(m_TileList);
            }

            GeoStar.Core.SimpleFillSymbol sym = new GeoStar.Core.SimpleFillSymbol(
                System.Drawing.Color.Transparent,
                System.Drawing.Color.Red, 0.1f);
            sym.StartDrawing(pDisplay as GeoStar.Core.Display);
            GeoStar.Core.Envelope env = new GeoStar.Core.Envelope();
            double xmin = 0, ymin = 0, xmax = 0, ymax = 0;

            GeoStar.Core.TextSymbol txt = new GeoStar.Core.TextSymbol();
            GeoStar.Core.Point      pt  = new GeoStar.Core.Point();
            txt.Width  = 5;
            txt.Height = 5;

            txt.StartDrawing(pDisplay as GeoStar.Core.Display);

            foreach (var item in vList)
            {
                m_Pyramid.TileExtent(item.Level, item.Row, item.Col, ref xmin, ref ymin, ref xmax, ref ymax);
                env.put_Coords(xmin, ymin, xmax, ymax);
                sym.Draw(env);
                pt.put_Coords(xmin, (ymin + ymax) / 2);
                txt.Text = item.ToString();
                txt.Draw(pt);
            }
            txt.EndDrawing();
            sym.EndDrawing();
        }