SHARE
TWEET

Untitled

a guest May 23rd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Drawing: NSView {
  2. override func drawRect(dirtyRect: NSRect) {
  3.     super.drawRect(dirtyRect)
  4.  
  5.     let context = NSGraphicsContext.currentContext()?.CGContext;
  6.  
  7.     CGContextBeginPath(context)
  8.     CGContextMoveToPoint(context, 0, 0)
  9.     CGContextAddLineToPoint(context, 100, 100)
  10.     CGContextSetRGBStrokeColor(context, 1, 1, 1, 1)
  11.     CGContextSetLineWidth(context, 5.0)
  12.     CGContextStrokePath(context)
  13.  
  14.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top