🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #6693

Re: problem with regions

#6693
From: The Doctor
Date: Wed, 06 Aug 1986 13:56
25 lines
1757 bytes
> Here is a problem I am having with regions:
> 
> I create a region and set it equal to a rectangle with a call to RectRgn.
> I then check to see if the mouse is clicked within the region and
> if it is, I call DragGrayRgn with a  nil for the actionProc. After
> dragging the region across the window, I release the mouse button. If I
> try to drag the region again, however, I find that the region is
> defined as the frame, not the enclosed area of the rectangle.  
> 
> What gives?!! I have to grab it by its border (PtInRgn is true for only
> this condition).  Obviously I want the region to remain unchanged.
> 

I believe a region is defined by the bits that are contained in it, not
what necessarily what they enclose.  Try defining the region as a solid
rectangle, not a frame.

Also, whay wouldn't you use PtInRect instead of PtInRgn?  Seems to me that
if you kept a copy of the rectangle that is the region around the program
would go a great deal faster since Rects are far more uniform than Regions,
hence the routine to decind is a point is contained within its boundries
would be more specific, thus faster.

Steve Hawley
joevax!sdh
Technical Details
Message-ID: <224@joevax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!petrus!magic!joevax!sdh
References: <1434@oddjob.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site joevax.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!petrus!magic!joevax!sdh
From: sdh@joevax.UUCP (The Doctor)
Newsgroups: net.micro.mac
Subject: Re: problem with regions
Message-ID: <224@joevax.UUCP>
Date: Wed, 6-Aug-86 09:56:31 EDT
Article-I.D.: joevax.224
Posted: Wed Aug  6 09:56:31 1986
Date-Received: Sat, 9-Aug-86 01:22:11 EDT
References: <1434@oddjob.UUCP>
Distribution: net
Organization: Bell Communications Research Inc., Morristown, NJ
Lines: 25