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

Trying to resize PICT using GWorlds (fwd)

Forwarded message:

From: makenner@mmm.com
Message-Id: <9207291623.AA14818@mmm.serc.3m.com>
Subject: Trying to resize PICT using GWorlds
To: info-mcl-request@cambridge.apple.com
Date: Wed, 29 Jul 92 11:23:40 CDT
X-Mailer: ELM [version 2.2 PL10]

I am again (still?) working on an application making heavy use of PICTs
and I need to be able to scale a PICT and write it to a file.

Since I don't want the smaller PICT to simply store the scaled draw command,
I was trying to do what I do in C - 

	get source picture from file
	create an offscreen GWorld
	lock its pixels
	cliprect the target rectangle 
	draw the source PICT into the target rectangle
	open a new PICT
	copybits the pixmap of the offscreen GWorld onto itself
	close the new PICT and write to file

I am using oodles-of-utils version 12, and have found the GWorld-u and 
GWorld-view files, but am having a major problem getting the call to copybits
to work.  I get a new pict with the correct frame, and with data 
that resembles a PICT, but the pict is damaged, with extra data at the end 
that is labelled as either Unimplemented or Unrecognized in the PICT (as
viewed in PICT Detective.  If I try to draw the result to a window, the 
picture looks fine, but of course the unrecognized stuff causes things 
to break.

Is there anyone out there that can help me with this?  I'm really in 
desperate need!

Thanks in advance -

Marty Kenner