예제 #1
0
        internal override void Draw(Graphics g, Datarow row)
        {
            PointF p1    = MapDrawHelper.ToScreenPoint(row.Extent.LeftTop, extent, width, height);
            PointF p2    = MapDrawHelper.ToScreenPoint(row.Extent.RightBottom, extent, width, height);
            Image  image = null;

            switch (this.layer.Datatable.TableType)
            {
            case DatatableType.Raster:
                if (row.Data is string)
                {
                    image = Image.FromFile((string)row.Data);
                }
                break;

            default:
                break;
            }
            if (image == null)
            {
                return;
            }
            g.DrawImage(image, p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y);
            image.Dispose();
        }
예제 #2
0
        internal override void Draw(Graphics g, Datarow row)
        {
            if (row.Data == null)
            {
                return;
            }
            MapLine       mapLine      = (MapLine)row.Data;
            List <PointF> screenpoints = new List <PointF>();

            foreach (MapPoint p in mapLine.Points)
            {
                screenpoints.Add(MapDrawHelper.ToScreenPoint(p, extent, width, height));
            }
            g.DrawLines(new Pen(Color.Orange, 2), screenpoints.ToArray());
        }
예제 #3
0
        internal override void Draw(Graphics g, Datarow row)
        {
            if (row.Data == null)
            {
                return;
            }
            MapPolygon    mapPolygon   = (MapPolygon)row.Data;
            List <PointF> screenpoints = new List <PointF>();

            foreach (MapPoint p in mapPolygon.Points)
            {
                screenpoints.Add(MapDrawHelper.ToScreenPoint(p, extent, width, height));
            }
            g.FillPolygon(new SolidBrush(Color.FromArgb(100, Color.Blue)), screenpoints.ToArray());
        }
예제 #4
0
        internal override void Draw(Graphics g, Datarow row)
        {
            PointF point = MapDrawHelper.ToScreenPoint((MapPoint)row.Data, extent, width, height);

            g.DrawImage(Properties.Resources.qiuji_online, point.X, point.Y, 12, 14);
        }