Results 1 to 3 of 3

Thread: [RESOLVED] Semitransparent graphic objects

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved [RESOLVED] Semitransparent graphic objects

    In a picturebox I have a number of geometric figures, basically rectangles and one polygon creted by means of the Polygon, CreatePolygonRgn and Rectangle functions. The polygon may overlap the rectangles and I would like to plot it semitransparent where the overlapping region occurs. I thought of plotting the rectangles in an invisible picturebox, the polygon in another and then Alphablending them to a visible picturebox. But I wonder if this is appropriate as it would blend the background as well as the polygon.

    Any other way to do it?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Semitransparent graphic objects

    Make the background white if that is what you are referring to


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Semitransparent graphic objects

    I finally used the API function SetROP2 with the R2_MASKPEN parameter and this produced a very reasonable effect, much more straightforward than the Alphablend alternative.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

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