Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick-draw PicHandle question



I haven't been following this thread but the basic approach to get an independant PicHandle from a GWorld goes like so:

PicHandle GWorldToPicture(GWorldPtr theWorld)
{
SetGWorld(theWorld, nil);

PicHandle thePict;
PixMapHandle theMap;
Rect bounds;

GetPortBounds(theWorld, &bounds);
theMap = ::GetGWorldPixMap(theWorld);
::LockPixels(theMap);
thePict = OpenPicture(&bounds);

::ForeColor(blackColor);
::BackColor(whiteColor);
::CopyBits((BitMap *)theMap, (BitMap *)theMap, &bounds, &bounds, ditherCopy, nil);
::ClosePicture();

return thePict; }

Hope this helps.

Cheers,
Chris.



email@hidden wrote:

But , have any method can convert "GWorld" to "PicHandle"


Howard




Dmitry Markman <dimitry.markman@verizon. To: email@hidden net> cc: Laurence Harris <email@hidden>, Sent by: email@hidden, email@hidden quicktime-api-admin@lists Subject: Re: quick-draw PicHandle question .apple.com 2002/09/19 06:04 PM




so, create offscreen with newgworld
draw your picture into that
gworld abd you can request PixMap from GWorld

Dmitry Markman

On Thursday, Sep 19, 2002, at 04:45 US/Eastern, email@hidden
wrote:



But "Twain" need use PicHandle the structure for Native transfer


Howard






Laurence Harris
<email@hidden> To:
<email@hidden>
Sent by: cc:
<email@hidden>
quicktime-api-admin@lists Subject: Re:
quick-draw PicHandle question
.apple.com


2002/09/19 05:10 PM








PicHandle thePicHandle;

thePicHandle=OpenPicture(&myRect);

How to access bitmap pixel from thePicHandle ?


You don't. If you want to access pixels or pixmap handles, you need a
GWorld
(a graphics world), not a PicHandle.

Larry :-) \V/_

PS: It's "QuickDraw"
_______________________________________________




--
----------------------------------------------------------------------
Chris Large - Totally Hip Software Inc. (www.totallyhip.com)

"The illiterate of the 21st century will not be those who cannot
read and write, but those who cannot learn, unlearn, and relearn."

Alvin Toffler
----------------------------------------------------------------------
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: quick-draw PicHandle question (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.