SharpMap实践代码
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms; namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); Initialize(); } private void Initialize() { System.Drawing.Image image = new System.Drawing.Bitmap(400,300); System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(image); System.Drawing.Brush brush = new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(120, System.Drawing.Color.Green )); System.Drawing.Drawing2D.GraphicsPath graphicsPath = new System.Drawing.Drawing2D.GraphicsPath(); System.Drawing.PointF[] pa = { new System.Drawing.PointF(123,12), new System.Drawing.PointF(34,45), new System.Drawing.PointF(99,34), new System.Drawing.PointF(100,100), new System.Drawing.PointF(200,300), new System.Drawing.PointF(300,200) }; graphicsPath.AddPolygon(pa); graphics.FillPath(brush,graphicsPath); this.pictureBox1.Image = image; //graphics.Dispose(); } }}