Esempio n. 1
0
        /// <summary>
        /// 绘制所有选择要素
        /// </summary>
        /// <param name="g"></param>
        /// <param name="extent"></param>
        /// <param name="mapScale"></param>
        /// <param name="dpm"></param>
        /// <param name="mpu"></param>
        /// <param name="symbol"></param>
        internal void DrawSelectedFeatures(Graphics g, moRectangle extent, double mapScale, double dpm, double mpu, moSymbol symbol)
        {
            //判断是否位于绘制范围内,不是,则绘制
            Int32 sFeatureCount = _SelectedFeatures.Count;

            for (Int32 i = 0; i < sFeatureCount; i++)
            {
                moFeature sFeature = _SelectedFeatures.GetItem(i);
                if (IsFeatureInExtent(sFeature, extent) == true)
                {
                    moGeometry sGeometry = sFeature.Geometry;
                    moMapDrawingTools.DrawGeometry(g, extent, mapScale, dpm, mpu, sGeometry, symbol);
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 根据指定方法执行选择,selectMethod即新建、求差、求交等
 /// </summary>
 /// <param name="features"></param>
 /// <param name="selectMethod"></param>
 public void ExecuteSelect(moFeatures features, Int32 selectMethod)
 {
     //说明:此处仅考虑新建集合
     if (selectMethod == 0)
     {
         _SelectedFeatures.Clear();
         Int32 sFeatureCount = features.Count;
         for (Int32 i = 0; i < sFeatureCount; i++)
         {
             _SelectedFeatures.Add(features.GetItem(i));
         }
     }
     else
     {
         throw new NotFiniteNumberException();
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 绘制所有要素
        /// </summary>
        /// <param name="g">绘图对象</param>
        /// <param name="extent">绘制范围(地图坐标)</param>
        /// <param name="mapScale">地图比例尺的倒数</param>
        /// <param name="dpm">每米对应的点数</param>
        /// <param name="mpu">地图坐标单位对应的米数</param>
        internal void DrawFeatures(Graphics g, moRectangle extent, double mapScale, double dpm, double mpu)
        {
            //(1)为所有要素配置符号
            SetFeatureSymbols();
            //(2)判断是否位于绘制范围内,如是,则绘制
            Int32 sFeatureCount = _Features.Count;

            for (Int32 i = 0; i < sFeatureCount; i++)
            {
                moFeature sFeature = _Features.GetItem(i);
                if (IsFeatureInExtent(sFeature, extent) == true)
                {
                    moGeometry sGeometry = sFeature.Geometry;
                    moSymbol   sSymbol   = sFeature.Symbol;
                    moMapDrawingTools.DrawGeometry(g, extent, mapScale, dpm, mpu, sGeometry, sSymbol);
                }
            }
        }