¡@

Home 

2014/10/15 ¤U¤È 10:15:15

iphone Programming Glossary: uibaseline

Why is UIBezierPath faster than Core Graphics path?

http://stackoverflow.com/questions/6327817/why-is-uibezierpath-faster-than-core-graphics-path

moveToPoint CGPointMake 0 200 Add 200 curve segments to each path. int iterations 200 CGFloat cgBaseline 100 CGFloat uiBaseline 200 CGFloat xincrement self.bounds.size.width iterations for CGFloat x1 0 x2 xincrement x2 self.bounds.size.width x1 x2.. cgpath NULL x1 cgBaseline 50 x2 cgBaseline 50 x2 cgBaseline uipath addCurveToPoint CGPointMake x2 uiBaseline controlPoint1 CGPointMake x1 uiBaseline 50 controlPoint2 CGPointMake x2 uiBaseline 50 UIColor blackColor setStroke CGContextAddPath.. 50 x2 cgBaseline 50 x2 cgBaseline uipath addCurveToPoint CGPointMake x2 uiBaseline controlPoint1 CGPointMake x1 uiBaseline 50 controlPoint2 CGPointMake x2 uiBaseline 50 UIColor blackColor setStroke CGContextAddPath ctx cgpath Stroke each path...