Upload
fareethjohn
View
268
Download
3
Tags:
Embed Size (px)
Citation preview
UIBezierPath
UIBezierPath
moveToPoint:
closePath
moveToPoint:
UIBezierPath
stroke fill stroke
fill
UIColor
addClip
+ bezierPath
UIBezierPath
+ bezierPathWithRect:
UIBezierPath
+ bezierPathWithOvalInRect:
UIBezierPath
+ bezierPathWithRoundedRect:cornerRadius:
UIBezierPath
+ bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:
UIBezierPath
+ bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise:
UIBezierPath
+ bezierPathWithCGPath:
UIBezierPath
– moveToPoint:
– addLineToPoint:
– addArcWithCenter:radius:startAngle:endAngle:clockwise:
– addCurveToPoint:controlPoint1:controlPoint2:
– addQuadCurveToPoint:controlPoint:
– closePath
– removeAllPoints
– appendPath:
CGPath
currentPoint
lineWidth
lineCapStyle
lineJoinStyle
miterLimit
flatness
usesEvenOddFillRule
– setLineDash:count:phase:
– getLineDash:count:phase:
– fill
– fillWithBlendMode:alpha:
– stroke
– strokeWithBlendMode:alpha:
– addClip
– containsPoint:
empty
bounds
– applyTransform:
@property(nonatomic, readonly) CGRect bounds
UIBezierPath.h
@property(nonatomic) CGPathRef CGPath
UIBezierPath
UIBezierPath.h
@property(nonatomic, readonly) CGPoint currentPoint
CGPointZero
@property empty
UIBezierPath.h
@property(readonly, getter=isEmpty) BOOL empty
moveToPoint:
UIBezierPath.h
@property(nonatomic) CGFloat flatness
0.6
UIBezierPath.h
@property(nonatomic) CGLineCap lineCapStyle
kCGLineCapButt
UIBezierPath.h
@property(nonatomic) CGLineJoin lineJoinStyle
kCGLineJoinMiter
UIBezierPath.h
@property(nonatomic) CGFloat lineWidth
UIBezierPath.h
@property(nonatomic) CGFloat miterLimit
kCGLineJoinMiter
UIBezierPath.h
@property(nonatomic) BOOL usesEvenOddFillRule
YES NO
●
●
NO
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPath
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithArcCenter:(CGPoint)center radius:(CGFloat)radius
startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise
center
radius
startAngle
endAngle
clockwise
0 π clockwise
YES
clockwise NO
32
0, 2
2
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithCGPath:(CGPathRef)CGPath
CGPath
nil
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithOvalInRect:(CGRect)rect
rect
rect
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithRect:(CGRect)rect
rect
rect
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect
byRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii
rect
corners
cornerRadii
UIBezierPath.h
UIBezierPath
+ (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect
cornerRadius:(CGFloat)cornerRadius
rect
cornerRadius
0
UIBezierPath.h
- (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius
startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise
center
radius
startAngle
endAngle
clockwise
0 π
clockwise YES
clockwise NO
UIBezierPath.h
- (void)addClip
CGContextSaveGState
CGContextRestoreGState
usesEvenOddFillRule
UIBezierPath.h
- (void)addCurveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1
controlPoint2:(CGPoint)controlPoint2
endPoint
controlPoint1
controlPoint2
endPoint
Start point Control point 2
Endpoint
Control point 1
moveToPoint:
point
UIBezierPath.h
- (void)addLineToPoint:(CGPoint)point
point
point
point
moveToPoint:
UIBezierPath.h
- (void)addQuadCurveToPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint
endPoint
controlPoint
endPoint
A Current point
B Control point
C Endpoint A Current point
B Control point
C Endpoint
moveToPoint:
point
UIBezierPath.h
- (void)appendPath:(UIBezierPath *)bezierPath
bezierPath
bezierPath
bezierPath
UIBezierPath.h
- (void)applyTransform:(CGAffineTransform)transform
transform
UIBezierPath.h
- (void)closePath
UIBezierPath.h
- (BOOL)containsPoint:(CGPoint)point
point
YES NO
usesEvenOddFillRule
closePath
UIBezierPath.h
- (void)fill
UIBezierPath.h
- (void)fillWithBlendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha
blendMode
alpha
0.0
1.0 0.0 1.0
UIBezierPath.h
- (void)getLineDash:(CGFloat *)pattern count:(NSInteger *)count phase:(CGFloat *)phase
pattern
nil
count
nil
pattern
phase
nil
pattern
pattern count
UIBezierPath.h
- (void)moveToPoint:(CGPoint)point
point
point
UIBezierPath.h
- (void)removeAllPoints
UIBezierPath.h
- (void)setLineDash:(const CGFloat *)pattern count:(NSInteger)count
phase:(CGFloat)phase
pattern
count
pattern
phase
6
UIBezierPath.h
- (void)stroke
UIBezierPath.h
- (void)strokeWithBlendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha
blendMode
alpha
0.0
1.0 0.0 1.0
UIBezierPath.h
enum {
UIRectCornerTopLeft = 1 << 0,
UIRectCornerTopRight = 1 << 1,
UIRectCornerBottomLeft = 1 << 2,
UIRectCornerBottomRight = 1 << 3,
UIRectCornerAllCorners = ~0
};
typedef NSUInteger UIRectCorner;
UIRectCornerTopLeft
UIBezierPath.h
UIRectCornerTopRight
UIBezierPath.h
UIRectCornerBottomLeft
UIBezierPath.h
UIRectCornerBottomRight
UIBezierPath.h
UIRectCornerAllCorners
UIBezierPath.h