[comp.sys.mac.programmer] Does anyone know how to concatenate PICTs together?

monching@quiche.cs.mcgill.ca (Patrick WONG) (10/30/90)

I need to concatenate two PICTs together.  I wish to program a unit in either
in pascal or c.  There would be two PicHandles.  The routine would have to
return a PicHandle with the first PICT in the background and the second PICT
in the foreground.  I was considering using copybits.

Any help would be appreciated.

-- 
patrick wong                   | McGill University           
monching@quiche.cs.mcgill.ca   | School of Computer Science  
                               | Montreal, Quebec            

rmh@apple.com (Rick Holzgrafe) (10/31/90)

In article <5429@quiche.cs.mcgill.ca> monching@quiche.cs.mcgill.ca 
(Patrick WONG) writes:
> I need to concatenate two PICTs together.  I wish to program a unit in 
either
> in pascal or c.  There would be two PicHandles.  The routine would have 
to
> return a PicHandle with the first PICT in the background and the second 
PICT
> in the foreground.

Try:
    PicHandle combinedPictsHandle;
    combinedPictsHandle = OpenPicture(&combinedPictsFrame);
    DrawPicture (picHandle1, &picFrame1);
    DrawPicture (picHandle2, &picFrame2);
    ClosePicture();

I haven't tried it myself, but I don't know why it wouldn't work. Hope it 
helps.

==========================================================================
Rick Holzgrafe              |    {sun,voder,nsc,mtxinu,dual}!apple!rmh
Software Engineer           | AppleLink HOLZGRAFE1          rmh@apple.com
Apple Computer, Inc.        |  "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 3-PK |    not necessarily represent those of my
Cupertino, CA 95014         |        employer, Apple Computer Inc."

Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (11/04/90)

>> In article <5429@quiche.cs.mcgill.ca> monching@quiche.cs.mcgill.ca 
> (Patrick WONG) writes:
> > I need to concatenate two PICTs together.  I wish to program a unit in 
> either
> > in pascal or c.  There would be two PicHandles.  The routine would have

> to
> > return a PicHandle with the first PICT in the background and the second

> PICT
> > in the foreground.
> 
> Try:
>     PicHandle combinedPictsHandle;
>     combinedPictsHandle = OpenPicture(&combinedPictsFrame);
>     DrawPicture (picHandle1, &picFrame1);
>     DrawPicture (picHandle2, &picFrame2);
>     ClosePicture();
> 
> I haven't tried it myself, but I don't know why it wouldn't work. Hope it

> helps.

I do that it a program and it does work.

 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker
Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org

Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (11/20/90)

monching@quiche.cs.mcgill.ca (Patrick WONG) says:

> I need to concatenate two PICTs together.  I wish to program a unit in either
> in pascal or c.  There would be two PicHandles.  The routine would have to
> return a PicHandle with the first PICT in the background and the second PICT
> in the foreground.  I was considering using copybits.

It seems like I solved this by just opening the 1st pict and DrawPicture()ing
the second Pict into it.  It's been awhile though.

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker
Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org