• 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
NSCopyBits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCopyBits


  • Subject: NSCopyBits
  • From: Andrew Frezell <email@hidden>
  • Date: Mon, 31 Mar 2003 14:46:19 -0500

Hello,

I'm working on writing a portability layer for Xlib and I'm trying to
implement the XCopyArea using NSCopyBits. The Display, Drawable, and
GC are #define'd away to int's and are currently ignored. The problem
I'm having is the NSCopyBits doesn't seem to do anything...I'm new to
Cocoa so I'm unsure how this is supposed to work and there is very
little documentation. Do I need to pass in the NSView and call
displayInRect on it, to get the repaint to occur or should it occur
immediately after calling NSCopyBits? I'm am doing the painting in an
OpenGL view, so could there be any issues with this? Any help or tips
on using NSCopyBits would really help. I would like the results to
paint immediately, so I think I need displayInRect as opposed to
setNeedsDisplayInRect.

static void XCopyArea(Display *d, Drawable src, Drawable dest, GC g,
int src_x, int src_y, unsigned int width, unsigned int height,
int dest_x, int dest_y) {
NSRect src = NSMakeRect(src_x, src_y, width, height);
NSPoint dest;

dest.x = dest_x;
dest.y = dest_y;

NSCopyBits(nil, src, dest);
}

---
Andrew Frezell
Software Engineer
AirDefense, Inc. <http://www.airdefense.net>
(770) 663-8115 x116
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Charting solutions (was "Is there a ready chart plotting view")
  • Next by Date: Re: Charting solutions
  • Previous by thread: Re: Charting solutions
  • Next by thread: Re: NSCopyBits
  • Index(es):
    • Date
    • Thread