Ejemplo n.º 1
0
        /// <summary>
        /// 绘制区域多边形
        /// </summary>
        private void StartDraw()
        {
            Clear();
            IGeometryFactory geometryFactory = new GeometryFactory();
            IPolygon         polygon         = (IPolygon)geometryFactory.CreateGeometry(gviGeometryType.gviGeometryPolygon, gviVertexAttribute.gviVertexAttributeNone);

            ISurfaceSymbol surfaceSymbol = new SurfaceSymbol()
            {
                Color = System.Drawing.Color.Yellow
            };

            IObjectManager objectManager = _AxRenderControl.ObjectManager;

            _RenderPolygon                    = objectManager.CreateRenderPolygon(polygon, surfaceSymbol, rootId);
            _RenderPolygon.HeightStyle        = gviHeightStyle.gviHeightOnTerrain;
            _RenderPolygon.MaxVisibleDistance = double.MaxValue;
            _RenderPolygon.MinVisiblePixels   = 3;

            _AxRenderControl.ObjectEditor.StartEditRenderGeometry(_RenderPolygon, gviGeoEditType.gviGeoEditCreator);
        }