Blog Archives

Drawing in Cocoa, Objective C using NSBezierPath

NSBezierPath appendBezierPathWithArcWithCenter @implementation RainbowView -(void)drawRect:(NSRect)dirtyRect { [[NSColor blackColor] set]; NSRectFill(dirtyRect); [[NSColor whiteColor] set]; NSBezierPath * path = [NSBezierPath bezierPath]; [path setLineWidth:10.5]; float xMargin = 0; float yMargin = 0.0; float maxWidth = dirtyRect.size.width – 2 * xMargin; float maxRadius =

Posted in Cocoa, Objective C, Swift Tagged with: , , , , , ,

Recent Posts


Hit Counter provided by technology news