Strange QTCaptureView behaviour
Strange QTCaptureView behaviour
- Subject: Strange QTCaptureView behaviour
- From: Peter Browne <email@hidden>
- Date: Sat, 5 Sep 2009 10:49:27 +0100
Hi all,
I'm returning to Cocoa after a bit of a break, and seem to be running
into problems that I'm sure must have an obvious solution...
Just for a bit of fun I'm trying to write a fake heads up display by
using a QTCaptureView's delegate method - (CIImage *)view:
(QTCaptureView *)view willDisplayImage:(CIImage *)image
This works, and I can draw onto a video preview fine, but the
coordinate system for the capture view seems to be messed up. For a
normal NSView, to get an NSRect the size of the view I'd just use
something like
NSRect viewBounds = [theView bounds];
but when I try and do the same for the QTCaptureView, the rect it
returns is about one third the actual size of the capture view, and
offset from the origin both horizontally and vertically by about 50 or
so pixels. When I use that rect to draw a bezierpath, instead of
drawing a nice outline around the whole video preview, it draws a mini
rectangle in the bottom left quarter of the screen!
Needless to say, this is very frustrating, and I can't really think of
any reason as to WHY this would be happening. I've tried using
NSRect viewBounds = [theQTCaptureView frame];
but this results in the same problem!
Any help would be appreciated
Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden