0

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!

IluTov
  • 6,807
  • 6
  • 41
  • 103

2 Answers2

3

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

This is the result:

enter image description here

IluTov
  • 6,807
  • 6
  • 41
  • 103
1

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..

Jay
  • 6,572
  • 3
  • 37
  • 65
  • Thanks for your answer. With the second question I mean, that I want to cut the bottom off the NSBezierPath. The first picture shows the whole bezier path. I would like to cut the bottom off, so I only have a slice of the top, like here: http://dribbble.com/shots/255396-mite-Client-for-Mac – IluTov Nov 23 '12 at 11:41