开发者

how to collect all the points in NSBezierpath to draw

开发者 https://www.devze.com 2023-03-20 12:08 出处:网络
I have store all the points in the array and pass to the NSBeizerPath so that it can draw through that path.The code i have implemented is as follows:

I have store all the points in the array and pass to the NSBeizerPath so that it can draw through that path.The code i have implemented is as follows:

- (void)drawPath:(NSPoint)inStartPoint toLastPoint:(NSPoint)inEndPoint
{

    NSBezierPath* path = [NSBezierPath bezierPath];
    NSLog(@"Drawing path....");
    [path moveToPoint:inStartPoint]; 
    [path lineToPoint:inEndPoint];    
    [mColor set];
    [p开发者_如何转开发ath fill];
    [path stroke];
}

This is drawing to only the startpoint and end point now how to draw where the cursor moves.

0

精彩评论

暂无评论...
验证码 换一张
取 消