[futurebasic] Get PICT Size

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1999 : Group Archive : Group : All Groups

From: Jim Henson <vegasswede@...>
Date: Fri, 30 Apr 1999 09:12:40 -0700
I have a 832x624 PICT Catalog that I use to "Store" various size 
Graphics, centered in a 832x600 rect "Page"

The Bottom 24 Pixel Margin of the page has 2 Edit Fields that contain 
Information about each Page and the PICT on it

Edit Field  #1 .. The Page Number & PICT Name

Edit Field  #2 .. The Date the Catalog was made

I want to add the 3rd Edit Field with the Actual Size of the PICT in 
Pixels .. 

THAT .. Has me "Stumped"

The FN .. FN centerIt(rect&) .. below

Gets the size of the PICT for .. FN Draw (pictID%) .. Below

So Far .. Piece Of Cake .. Down Town

NOW .. Brown Cow .. HOW do I make it give me the Size of the PICT in 
Pixels to enter in the 3rd Edit Field of the FN .. FN PictSize .. 
last/below

Every thing I've tried gets a "Huh .. What did you say" & Blank Stare 
from "Dumb Dumb IV"

This G3 is SO Thick Headed .. Just like his Owner

>CLEAR LOCAL
>LOCAL FN centerIt(rect&)
>  DIM x%, y%
>  x% = rect&.right% - rect&.left%
>  y% = rect&.bottom% - rect&.top%
>  rect&.left% = 416 - (x% / 2)
>  rect&.right% = rect&.left% + x%
>  rect&.top%  = 300 - (y% / 2)
>  IF rect&.top% < 0 THEN rect&.top% = 0
>  rect&.bottom% = rect&.top% + y%
>END FN

>LOCAL FN Draw (pictID%)
>  DIM X%, Y%
>  DIM pictH&, resID%, resType&, rect.8
>  LONG IF pictID%
>    pictH& = FN GETPICTURE (pictID%)
>    LONG IF FN RESERROR = _noErr AND pictH& <> 0
>      rect;8 = [pictH&]+_picFrame
>      CALL GETRESINFO (pictH&, resID%, resType&, gCurRecordName$)
>      FN centerIt (@rect)
>      X% = rect.left%
>      Y% = rect.top%
>      PICTURE (X%, Y%) , pictH&
>      CALL RELEASERESOURCE (pictH&)
>    END IF
>  END IF
>END FN

WHAT would the 2nd part of the line ..  temp$ = "Size Of Pict * " + .. be

AND How do I get it

>LOCAL FN PictSize
>  DIM temp$
>  TEXT _sysFont,12,0
>  CALL RGBBACKCOLOR (gMyColor(8))
>  EDIT FIELD #-2, "", (527,605)-(737,621),_statFramed, _centerJust
>> temp$ = "Size Of Pict * " + 
>  EDIT$ (2) = temp$
>END FN

I SURE would be MUCH Beholden for some help

Jim Henson,The Vegas Swede, (^_^) s aplenty

Las Vegas is the Number One Fun Capital Of The World
An Oasis Dedicated To Around The Clock Entertainment
Come Often, Enjoy Its Many Pleasures, Stay A Spell
And Bring Lots Of Money, Help Keep Nevada Green