RE: Using selectedMenuItemColor
RE: Using selectedMenuItemColor
- Subject: RE: Using selectedMenuItemColor
- From: Lee Ann Rucker <email@hidden>
- Date: Sat, 09 Apr 2011 23:13:29 -0700
- Acceptlanguage: en-US
- Thread-topic: Using selectedMenuItemColor
Interesting - if you set the view so its Y origin is zero, it draws as expected.
BTW, you should be using [self bounds], not [self frame].
________________________________________
From: cocoa-dev-bounces+lrucker=email@hidden [cocoa-dev-bounces+lrucker=email@hidden] On Behalf Of Eric Gorr [email@hidden]
Sent: Saturday, April 09, 2011 7:15 PM
To: Cocoa Dev
Subject: Using selectedMenuItemColor
I've got a sample application at http://ericgorr.net/cocoadev/colordrawing.zip attempting demonstrate what I am trying to do.
Basically, I would like the smaller rectangles to the right of the large one to all look the same.
However, when filling a rect using selectedMenuItemColor, the way the rectangle is filled depends on where in the view the rectangle is filled. I would like to be able to control the way the rectangle is filled when using selectedMenuItemColor and have it be independent of where in the view the rectangle is filled. I thought I might be able to use setPatternPhase to have this control, but it had no effect.
Now, I could simply create a NSImage, fill it using selectedMenuItemColor, and then draw it where ever I want, but I was wondering if there was some other method I could employ.
Hopefully this makes sense... if not, let me know and I will try to explain further.
Thanks.
_______________________________________________
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
_______________________________________________
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