[futurebasic] Re: BITMAPTOREGION

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1998 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Tue, 29 Sep 1998 20:18:10 -0500
Lucy wrote:
> All right, I give up. Is there any way to extract a region (for clipping or
> whatever) out of a PICT?

I'm not sure I understand the question.  Are you trying to generate a
"region" data structure which covers the same rectangle as a given
PICT?  If so, you can do it by first getting the PICT's border rectangle
(assuming pictH& is a handle to the PICT):

DIM rect.8
rect;8 = [pictH&] + _picFrame

...and then creating a region which matches that rectangle, like so:

rgnH& = FN NEWRGN  'Create a new region in memory
CALL RECTRGN(rgnH&, rect)  'Set the region to equal the rectangle

Then rgnH& will be a handle to a region which equals the picture's
rectangle.

- Rick