• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I use CGrafPtr value?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I use CGrafPtr value?


  • Subject: Re: How can I use CGrafPtr value?
  • From: Scott Thompson <email@hidden>
  • Date: Sun, 5 Mar 2006 00:20:00 -0600


On Mar 4, 2006, at 10:49 PM, 이종웅 wrote:

hi,
I can get a CGrafPtr from brower plugin.
then I want to draw something by using this CGrafPtr value.
I heard CGrafPtr is the structure for Carbon windows(I have no
experience with Carbon).
but I can't use this value in my Cocoa app(I just start Cocoa).

how can I use CGrafPtr in my cocoa app?

I'm sorry I'm not good at English.

This was typed into mail, but you could try something like:

CGContextRef cgContext;

OSStatus err = QDBeginCGContext(yourCGrafPtr, &cgContext);
if(err == noErr)
{
	[NSGraphicsContext saveGraphicsState];

// I don't know if the flipped paramter below should be true or false.
[NSGraphicsContext setCurrentContext: [NSGraphicsContext graphicsContextWithGraphicsPort: cgContext flipped: NO];


	/* draw here */

	[NSGraphicsContext restoreGraphicsState];

	QDEndCGContext(yourCGGrafPtr, &cgContext);
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How can I use CGrafPtr value? (From: "이종웅" <email@hidden>)

  • Prev by Date: Re: How can I use CGrafPtr value?
  • Next by Date: Re: Parsing a packet Async Socket
  • Previous by thread: Re: How can I use CGrafPtr value?
  • Next by thread: find, sort...makewhatis
  • Index(es):
    • Date
    • Thread