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: drawing and writing text in a NSQuickDrawView



On 6/29/06, Angelo Chen <email@hidden> wrote:
Hi,

i set a NSCustomView in IB, then set it's custom class
to NSQuickDrawView and linked it to a outlet called
view, I'd like to draw a red background on it, i tried
the following code, but does not work, what I miss
here? thanks.

[[NSColor redColor] set];
NSRectFill([view bounds]);
[view display];

It sounds like you don't know what an NSQuickDrawView is. It's for embedding QuickDraw, Carbon's deprecated drawing technology brought over from the classic Mac OS, in the Cocoa view system. If you aren't using QuickDraw then you have no reason to use this view.

If you *do* need to use this view, then you need to actually use
QuickDraw to draw in it, rather than Cocoa drawing. How to fill a view
with red using QuickDraw is beyond the scope of this list.

Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >drawing and writing text in a NSQuickDrawView (From: Angelo Chen <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.