Jump to content
  • Advertisement
Sign in to follow this  
xllx_relient_xllx

Win32: Excluding region of arbitrary size - not rectangular

This topic is 4817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible? The only function I know of that can exclude part of a region is ExcludeClipRect. The problem with it is that if you want to exclude a region of an arbitrary size othar than rectangular, you can't, because you're limited to rectangles only. Here's what I'm trying to do in my app.. I'm currently working on a hit-test button - with regions. This button is rectangular round, drawn with RoundRect(). I want to exclude this button from being painted so it will not flicker when the window is resized. Using ExcludeClipRect does not yield the desired results because it excludes a rectangular button and makes my round rect button appear to have white pointy edges. Is there any function similar to ExcludeClipRect but for excluding regions of arbitrary (not rectagular) size? If not, what other function/s could I use to accomplish this task, if any? Thanks in advance, relient

Share this post


Link to post
Share on other sites
Advertisement
Even if there were I don't think it would be advisable to use such functionality.

However, I _think_ what you are looking for is buffering of some sort, however, flicker-free controls can be quite the problem in windows, and buffering is the closest I've ever got to making controls flicker-free, I'm sure there are ways to make it completely flicker-free.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i do it the reverse way, that is to say, i build up a new clipping region from only those pixels that i want shown.

i use CombineRgn to do this. for bitmap-based areas, i have my own function that creates a HRGN from the bitmap's or icon's non-transparent pixels.

then i use SelectClipRgn just prior to painting.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!