Results 1 to 2 of 2

Thread: Drawing help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24

    Drawing help

    Hey all,



    How can i draw something on a form with a background on it, but still i can see the background?


    I mean, imagine i have some black lines on a white surface. I want to paint boxes on it, but still see the black lines.


    Thanks

  2. #2

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24
    Like this...

    My background is several balck lines (a box) on a white surface. I made it in paint, its a bmp picture.

    When i draw with the methods shown in the drawing chapter of your book, they cover my back lines.

    If i draw a red circle i don't see the black lines under it. How can i make the things i draw (circles and rectangles) transparent ?



    I do somthing like this:



    Code:


    private Bitmap Sup = new Bitmap (mybmppath);

    this.BackgroundImage = Sup;


    Graphics g = Graphics.FromImage(Sup);
    Rectangle rect = new Rectangle(X , Y, 10, 10);

    //X and Y are user given coordinates

    g.FillEllipse(Brushes.Green, rect);


    private void Map_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
    {
    this.BackgroundImage = Sup;
    }






    Problem is that the circle coveres the black lines in the bmp. How can i overcome that?


    BIIIIGGGGGGGGGGGG THANKS!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width