在一个webform窗体中,想在一副固定的图象如中国地图上画出一些圆和线,而且根据不同的参数,画的线和圆是不同的.谁有好办法?谢谢了!

解决方案 »

  1.   

    用bmp把这个图打开,用Graphacs.CreatFromImage,画线、文本,然后把它输出到客户端
    金质打印通快有这些功能 了,哈哈
      

  2.   

    g=pictureBox1.CreateGraphics();
    g.DrawArc(pen,fCenterX+x,fCenterY+y,width,height,startAngle,sweepAngle-startAngle);
      

  3.   

    20011521() :
    在代码
    g=pictureBox1.CreateGraphics();
    g.DrawArc(pen,fCenterX+x,fCenterY+y,width,height,startAngle,sweepAngle-startAngle);
    中,固定的图片列如地图是不是放在pictureBox1中?而且我说的是要在 web窗体 中输出哟!
      

  4.   

    flygoldfish(长江支流) 你有详细的代码吗?是在web中吗?
      

  5.   

    flygoldfish(长江支流):金质打印通是啥东东?
      

  6.   

    step1: Use image object to read your picture;
    step2: Create graphic object by image object;
    step3: Draw lines or other using graphic object and save it
    step4: Show the new image
      

  7.   

    Knight94(愚翁) ( ):烦您给出代码好吗,好急的!
      

  8.   

    Knight94(愚翁) ( )烦您老给出代码好吗,好急的!
      

  9.   


    Bitmap myBitmap = new Bitmap(@"C:\Documents and 
       Settings\Joe\Pics\myPic.bmp");
    Graphics g = Graphics.FromImage(myBitmap);
    g.DrawArc(pen,fCenterX+x,fCenterY+y,width,height,startAngle,sweepAngle-startAngle);
    pictureBox1.Image=
      

  10.   

    System.Drawing.Image imageFile = System.Drawing.Image.FromFile(Server.MapPath("Images/SampImag.jpg"));
    // Create graphics object for alteration.
    Graphics newGraphics = Graphics.FromImage(imageFile);
    // Alter image.
    newGraphics.FillRectangle(new SolidBrush(Color.Coral), 50, 50, 100, 100); // Draw image to screen.
    imgTest.ImageUrl = @"Images\SampImag.jpg";
    // Release graphics object.
    newGraphics.Dispose();
      

  11.   

    sample as follows( debugged )
    string strFileName = Server.MapPath("Images/SampImag.jpg"); // Create image.
    System.Drawing.Image imageFile = System.Drawing.Image.FromFile(strFileName);
    // Create graphics object for alteration.
    Graphics newGraphics = Graphics.FromImage(imageFile);
    // Alter image.
    newGraphics.FillRectangle(new SolidBrush(Color.Coral), 50, 50, 100, 100);
    strFileName = Server.MapPath( "Images" ) + "\NewImag.jpg";
    imageFile.Save( strFileName); // Draw image to screen.
    imgTest.ImageUrl = @"Images\NewImag.jpg";
    // Release graphics object.
    newGraphics.Dispose();
      

  12.   

    注意上面的代码需要进行设置,具体如下:
    目录Images是在你的web虚拟目录下;然后在系统中设置这个目录能对aspnet用户可写。
    否则上面的程序无法成功。