Blog Archives

NSBezierPath Curves and Graphs

NSBezierPath Curves and Graphs In this sample code we will create the below output using NSBezierPath. Here we primarily using moveToPoint , lineToPoint & curveToPoint methods of NSBezierPath // // GraphView.h // KSSineCurve // // Created by Debasis Das on 5/13/14.

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

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