🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #47343

Re: Displaying 'PICT's in Think Pascal 2.03

#47343
From: Raymond C. Fischer
Date: Sun, 04 Mar 1990 21:42
24 lines
1645 bytes
In article <17714@boulder.Colorado.EDU> steelem@boulder.Colorado.EDU (STEELE MARK ALLEN) writes:
>I am trying to write a program in Think Pascal 2.03 that will display a 
>PICT resource. The problem is as follows: I created a resource with ResEdit
>pasted the picture into the PICT resource number 400, I checked the size
>of the rectangle, then in my project I used the command GetPicture(400) to
>get the pict resource ( I remebered to check the box in the run options...)
>then I set up a rectangle of the same size as the picture.rectangle, then
>copied the picture into that rectangle on the screen as ugh!!! the mess 
>that displays on the screen is nothing near what the PICT should be.
>What am I forgetting?????

It's hard to say just from your description, but it looks like you're _copying_
the PICT instead of _drawing_ it.  To display a PICT in a window do ...

pic := GetPicture (picId);
DrawRect := pic^^.picFrame;
DrawPicture (pic, DrawRect);

The picture will appear in the current window.  If the DrawRect is not the
same size as the original picture, then the result will be scaled accordingly.

Ray Fischer
rcfische@polyslo.calpoly.edu
Technical Details
Message-ID: <25f18bc9.4228@polyslo.CalPoly.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!polyslo!rcfische

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!polyslo!rcfische
From: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: Re: Displaying 'PICT's in Think Pascal 2.03
Message-ID: <25f18bc9.4228@polyslo.CalPoly.EDU>
Date: 4 Mar 90 21:42:33 GMT
Reply-To: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer)
Distribution: usa
Organization: Cal Poly State University -- San Luis Obispo
Lines: 24