FROM : Buddy Kurz
DATE : Fri Nov 22 15:58:45 2002
I just ran into the same problem.
Alpha doesn't work with NSRectFill(rect);
Use [NSBezierPath fillRect:rect];
On Friday, November 22, 2002, at 01:53 AM, Steve wrote:
> I'm trying to create a colored semi-transparent square area within a
> window.
> I'm creating a custom view, and then NSRectFill-ing the entire box
> with a color whose opacity is set to 0.5,
> in the hope that I can get the default gray/white lines of the window
> to show through.
> I thought the problem might be that the window beneath (i.e. the
> superview) is not opaque.
> If this is the problem, it seems I have to subclass the window just so
> I can override the isOpaque method.
>
> Or is there just a much better way to achieve the desired result?
>
> I know that NSBox can give you a light-gray semi-transparent box,
> and, I can replace the contents with a solid color. But obviously,
> neither of these give me custom-color semi-transparency.
>
> Thanks
>
>
> Steve
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Nov 22 15:58:45 2002
I just ran into the same problem.
Alpha doesn't work with NSRectFill(rect);
Use [NSBezierPath fillRect:rect];
On Friday, November 22, 2002, at 01:53 AM, Steve wrote:
> I'm trying to create a colored semi-transparent square area within a
> window.
> I'm creating a custom view, and then NSRectFill-ing the entire box
> with a color whose opacity is set to 0.5,
> in the hope that I can get the default gray/white lines of the window
> to show through.
> I thought the problem might be that the window beneath (i.e. the
> superview) is not opaque.
> If this is the problem, it seems I have to subclass the window just so
> I can override the isOpaque method.
>
> Or is there just a much better way to achieve the desired result?
>
> I know that NSBox can give you a light-gray semi-transparent box,
> and, I can replace the contents with a solid color. But obviously,
> neither of these give me custom-color semi-transparency.
>
> Thanks
>
>
> Steve
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Steve | Nov 22, 10:53 | |
| Kris Amico | Nov 22, 11:34 | |
| Steve | Nov 22, 12:26 | |
| Buddy Kurz | Nov 22, 15:58 | |
| John C. Randolph | Nov 22, 20:46 |






Cocoa mail archive

