Challenge: Stroke

Here’s my solution to the Challenge: Stroke.

        dieShape.lineWidth = 10
        NSColor.greenColor().set()
        dieShape.stroke()

This code follows on from my solution to Challenge: Gradients. This means you’ll need the following code for it to work (which needs to be before the code snippet above).

        let dieShape = NSBezierPath()
        dieShape.appendBezierPathWithRoundedRect(dieFrame, xRadius: cornerRadius, yRadius: cornerRadius)