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

No Subject



I was wondering if anybody has experimented with the new GUI modules?  These
are very cool!

I'm getting the PICT preview resource from an EPS and then I'm displaying that
in a window.  However, when I try to get the bounding rect of the image, I get
the following error:

	Can't locate object method "picFrame" via package "PicHandle"

Am I trying to access this field incorrectly?  The code follows:

#!/usr/bin/perl

use Mac::Events;
use Mac::Windows;
use Mac::QuickDraw;
use Mac::Resources;

$eps = "Edge 2000:Desktop Folder:test.eps";
$res = OpenResFile($eps) or die ^$E;
$pict = GetPicture(256);
$imageRect = $pict->picFrame;
#$imageRect = new Rect 10, 10, 250, 250;

$bounds = new Rect 50, 50, 550, 290;
$win = new MacWindow $bounds, "Draw Pict Resource", 1, documentProc, 1;
$win->sethook("redraw", \&DrawOurWindow);
WaitNextEvent while $win->window;
dispose $win;

CloseResFile($res);

sub DrawOurWindow {
	DrawPicture $pict, $imageRect;
}

Thanks,
Kevin