示例#1
0
        public override void Render(Graphics graphics, Map mapBox)
        {
            if (newArrowLineLayer != null && newArrowLineGeometry != null)
            {
                newArrowLineLayer.Render();
                graphics.DrawImage(newArrowLineLayer.Image, 0, 0);
            }

            MapControl.SelectTool.Render(graphics, mapBox);
            MapControl.SnapTool.Render(graphics, mapBox);
        }
示例#2
0
 public override void Render(Graphics graphics, Map mapBox)
 {
     if (null == newLineLayer)
     {
         return;
     }
     newLineLayer.Render();
     graphics.DrawImage(newLineLayer.Image, 0, 0);
     MapControl.SelectTool.Render(graphics, mapBox);
     MapControl.SnapTool.Render(graphics, mapBox);
 }
示例#3
0
        /// <summary>
        /// Visual rendering of the measurement (two line-connected points and the text)
        /// </summary>
        /// <param name="graphics"></param>
        /// <param name="map"></param>
        public override void Render(Graphics graphics, Map map)
        {
            pointLayer.Map            = map;
            pointLayer.Visible        = true;
            pointLayer.RenderRequired = true;
            pointLayer.Render();
            graphics.DrawImageUnscaled(pointLayer.Image, 0, 0);

            // Show the distance in text
            if (geometries.Count >= 2)
            {
                Font distanceFont = new Font("Arial", 10);
                Map.WorldToImage(geometries[1].Coordinate);
                PointF textPoint = Map.WorldToImage(geometries[1].Coordinate);
                if (distanceInMeters > double.MinValue)
                {
                    graphics.DrawString(distanceInMeters.ToString("N") + "m", distanceFont, Brushes.Black, textPoint);
                }
            }
        }