[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Getting TEXT out or the resource fork



>2.  I need to open a pic out of the pict resource and get its height and 
>width.

Assuming you can also get a handle to the pict resource, you can use 
Mac::Quickdraw.  The coordinates of the picture are stored in it's 
picFrame() method

use Mac::QuickDraw

my($p, $r);
$p = GetPicture(128); # Returns a handle to PICT 128
$r = $p->picFrame();  # places the pictures coords into $r

PICT rectangles don't always start at (0,0), so use OffsetRect() to 
change the starting location.

This is almost straight from MPPE, Chapter 14, pg 207, which includes an 
example of using OffsetRect() which I've omitted.

Hey, waddaya know!  Some of this stuff is actually sinking in!

--B

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
#
# First they ignore you. Then they laugh at you. Then they fight you.
# Then you win.                                     --Mohandas Gandhi


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org