[futurebasic] Re: [FB] RE: [FB^3] USR GETPICT

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2000 : Group Archive : Group : All Groups

From: Charlie Dickman <charlied@...>
Date: Fri, 7 Jan 2000 18:17:53 -0500
>Derek Smith wrote:
>
>  > On Tue, 28 Dec 1999, Charlie Dickman wrote:
>  >
>  > > Derek,
>  > >
>  > > Thanks, that did the trick (along with correcting the value assigned
>  > > to white.blue% ;-). Now, the $64 question... Why is it necessary to
>  > > call GETCWMGRPORT in FB^3 when it's not needed in FBII?
>  >
>  > I'm not aware of any circumstance where GETPICT functioned properly
>  > without setting to the Window Manager port.  Otherwise clipping regions
>  > and local boundaries screw it up.  There was probly some circumstance in
>  > the FBII runtime where the FrontWindow was the Window Manager port and
>  > that's why it works.  The FB^3 runtime doesn't contain any of the code
>  > from the FBII version, so obscure things are going to fall thru the
>  > cracks.
>
>I've used USR GETPICT frequently and have never had to set to the Window
>Manager port to make it work.  The way USR GETPICT works seems to be thus:
>
>* It always gets pixels from the screen (doesn't matter which grafport is
>current);
>* The rectangle you specify is always taken to be in the current grafport's
>local coordinates (but it does not have to be contained within the port's
>boundaries!);
>* The image is clipped to the current grafport's clipping region.
>
>When using USR GETPICT, people sometimes want to use a coordinate system in
>which (0,0) indicates the upper-left corner of the screen, and want to use a
>clipping region that encompasses the whole screen.  Setting the current port
>to be the Window Manager port is _one_ way to do that.  But personally, I
>don't like to change ports unless I'm intending to send output to the new
>port.
>
>Here's a demo that takes a snapshot of the whole screen using USR GETPICT, and
>does not set to the Window Manager port.  Works in FBII.  If it doesn't work
>in FB^3 (I haven't tried it), then I'd say USR GETPICT is not working as
>advertised.

<snip>

Rick,

The FBII code like what you wrote doesn't work in FB^3. I found that 
Derek's suggested use of GETCWMGRPORT does the trick in FB^3. I agree 
with your assessment that USR GETPICT in FB^3 does not work as it 
should (if the way it works in FBII is a measure) but Staz has 
remained silent on the subject.

In fact, based on something else Derek said about the use of 
GETCWMGRPORT being necessary in any (FBII) code that is correct I 
tried to make it work in FBII and it failed.

Charlie Dickman
charlied@...