Question

I have a NSBezierPath, in the shape of a menubar panel.

enter image description here

I'd like to make a header now. Like this one for example. But only like 30 pixels from the top.

I can't figure out how I should only get the top part of the NSBezierPath. This is my first question. How can I cut off a piece of the NSBezierPath, or how can I make a Union of the NSBezierPath.

Then I want to add a gradient like in the example. The gradient is clear, but how can I add the glow at the top of it? I have added a shadow in another app back then, but it seemed a little dirty.

enter image description here

So how can I make a shadow at the top of the NSBezierPath, like in the provided example.

Thanks!

Was it helpful?

Solution

I ended up using PaintCode, which did a pretty good job for me.

This is the result:

enter image description here

OTHER TIPS

To get the 'light' edge at the top of the element you can just draw (i.e. :fill) the NSBezierPath with a vertical offset of e.g. -1 points with a brighter color. Then draw the shape (at y=+1 points) on top of that.

Not sure what you mean by making the header and cutting of bits..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top