如题

解决方案 »

  1.   

    不是一个小题目,许多软件公司都不做不好。做得比较好的是AUTOCAD。
      

  2.   

    用gdi+画图画在一个bitmap位图上,然后bitmap.save(文件名,选择jpg格式)
    如果你要可以设计,拖拉线条什么的,那全要自己去控制了,设计中所有单独图形都要保存成对象放入图形列表以供绘制和控制鼠标点2下在2点间画线,右键保存到c:\a.jpgusing System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Drawing.Imaging;namespace WindowsApplication110
    {
        public partial class Form1 : Form
        {
            PictureBox PB = null;
            Bitmap OrgBmp = null;
            List<Point> Points = new List<Point>();
            List<Point[]> Lines = new List<Point[]>();
             
            public Form1()
            {
                InitializeComponent();            PB = new PictureBox();
                PB.Dock = DockStyle.Fill;
                PB.Parent = this;            OrgBmp = new Bitmap(PB.ClientRectangle.Width, PB.ClientRectangle.Height);            using (Graphics G = Graphics.FromImage(OrgBmp))
                    G.FillRectangle(Brushes.Black, PB.ClientRectangle);            Draw();            PB.MouseDown += new MouseEventHandler(PB_MouseDown);
                PB.MouseUp += new MouseEventHandler(PB_MouseUp);
            }        void PB_MouseUp(object sender, MouseEventArgs e)
            {
                if (Points.Count == 2)
                {
                    Lines.Add(Points.ToArray());
                    Points.Clear();
                    Draw();
                }
            }        void PB_MouseDown(object sender, MouseEventArgs e)
            {
                if (e.Button == MouseButtons.Left)
                    Points.Add(e.Location);
                else
                    if (e.Button == MouseButtons.Right)
                    {
                        Save();
                        MessageBox.Show("ok");
                    }
            }        void Draw()
            {
                Bitmap CacheBmp = GetCacheBmp();
                PB.Image = CacheBmp;
            }        void Save()
            {
                Bitmap CacheBmp = GetCacheBmp();
                CacheBmp.Save(@"c:\a.jpg", ImageFormat.Jpeg); 
            }        Bitmap GetCacheBmp()
            {
                Bitmap CacheBmp = new Bitmap(OrgBmp);            using (Graphics G = Graphics.FromImage(CacheBmp))
                {
                    foreach (Point[] Line in Lines)
                        G.DrawLine(Pens.Red, Line[0], Line[1]);
                }
                return CacheBmp;
            }
        }
    }
      

  3.   

    我做过用C#来画图,虽然不是矢量图,但是应该可以参考的http://blog.csdn.net/LorenLiu/archive/2008/12/23/3585762.aspx 这个是第一篇,往后一共是9篇