03-12-2002, 04:16 PM
In light of a lot of recent posts about using regions, can someone please explain a few things to me about them (all I know is there are a lot of these API calls, but I don't know their names). Can you guys please explain stuff like:
1) Where and for what are regions used.
2) Site or other place where I can get a tutorial on how to use them
3) Common API's that involve regions
I should note that I like VB graphic and game programming and this is why I am asking. Thanks for the help.
03-13-2002, 02:36 AM
A region is merely an area defined by three or more points. The points are normally of the PointAPI type. Type POINTAPI
X As Integer
Y As Integer
You use them for collision detection, drawing routines, masking, shaped forms etc.
I think Hand has done a tutor on regions at www.elitevb.comCommon APIs? Search at www.AllAPI.net for "region".
03-13-2002, 02:53 AM
A region is an area of something. They can be, as Chief said, defined by points, using the CreatePolygonRgn API, but they can be any shape you want. The ways of creating regions include:
Direct region creation:
Creating regions from exisiting regions:
And uses include:
Custom shaped forms or controls (SetWindowRgn)
Collision detections (PtInRegion, RectInRgn, EqualRgn)
Creating invisible 'hot spots' to overlay on a picture, like imagemaps used on the web.
Drawing shapes (FrameRgn, FillRgn)
And probably much more........ :D
03-13-2002, 07:59 AM
Aight thanks guys, looks like I'll be reading a bit for a few days.