Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Drawing: NSView {
- override func drawRect(dirtyRect: NSRect) {
- super.drawRect(dirtyRect)
- let context = NSGraphicsContext.currentContext()?.CGContext;
- CGContextBeginPath(context)
- CGContextMoveToPoint(context, 0, 0)
- CGContextAddLineToPoint(context, 100, 100)
- CGContextSetRGBStrokeColor(context, 1, 1, 1, 1)
- CGContextSetLineWidth(context, 5.0)
- CGContextStrokePath(context)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement