#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <UIKit/UIKitDefines.h>
typedef NS_OPTIONS(NSUInteger, UIRectCorner) {
UIRectCornerTopLeft = 1 << 0,
UIRectCornerTopRight = 1 << 1,
UIRectCornerBottomLeft = 1 << 2,
UIRectCornerBottomRight = 1 << 3,
UIRectCornerAllCorners = ~0UL
};
NS_CLASS_AVAILABLE_IOS(3_2) @interface UIBezierPath : NSObject<NSCopying, NSCoding> {
@private
CGPathRef _path;
CGFloat *_lineDashPattern;
NSUInteger _lineDashPatternCount;
CGFloat _lineWidth, _miterLimit, _flatness, _lineDashPhase;
CGLineCap _lineCapStyle;
CGLineJoin _lineJoinStyle;
BOOL _usesEvenOddFillRule;
CGPathRef _immutablePath;
BOOL _immutablePathIsValid;
}
+ (UIBezierPath *)bezierPath;
+ (UIBezierPath *)bezierPathWithRect:(CGRect)rect;
+ (UIBezierPath *)bezierPathWithOvalInRect:(CGRect)rect;
+ (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius;
+ (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect byRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii;
+ (UIBezierPath *)bezierPathWithArcCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise;
+ (UIBezierPath *)bezierPathWithCGPath:(CGPathRef)CGPath;
@property(nonatomic) CGPathRef CGPath;
- (CGPathRef)CGPath NS_RETURNS_INNER_POINTER;
- (void)moveToPoint:(CGPoint)point; // 起點(diǎn)
- (void)addLineToPoint:(CGPoint)point; // 中間點(diǎn)
- (void)addCurveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2; // 貝塞爾控制曲線
- (void)addQuadCurveToPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint;
- (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise NS_AVAILABLE_IOS(4_0);
- (void)closePath; // 封閉曲線
- (void)removeAllPoints; // 移除所有點(diǎn)
- (void)appendPath:(UIBezierPath *)bezierPath; // 拼接路徑
- (UIBezierPath *)bezierPathByReversingPath NS_AVAILABLE_IOS(6_0);
- (void)applyTransform:(CGAffineTransform)transform;
@property(readonly,getter=isEmpty) BOOL empty;
@property(nonatomic,readonly) CGRect bounds;
@property(nonatomic,readonly) CGPoint currentPoint;
- (BOOL)containsPoint:(CGPoint)point;
@property(nonatomic) CGFloat lineWidth; // 線寬
@property(nonatomic) CGLineCap lineCapStyle;
@property(nonatomic) CGLineJoin lineJoinStyle;
@property(nonatomic) CGFloat miterLimit;
@property(nonatomic) CGFloat flatness;
@property(nonatomic) BOOL usesEvenOddFillRule;
- (void)setLineDash:(const CGFloat *)pattern count:(NSInteger)count phase:(CGFloat)phase;
- (void)getLineDash:(CGFloat *)pattern count:(NSInteger *)count phase:(CGFloat *)phase;
- (void)fill; // 實(shí)心繪制
- (void)stroke; // 空心繪制
- (void)fillWithBlendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha;
- (void)strokeWithBlendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha;
- (void)addClip; //
@end
UIBezierPath.h
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門丐枉,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人掘托,你說我怎么就攤上這事瘦锹。” “怎么了闪盔?”我有些...
- 文/不壞的土叔 我叫張陵弯院,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我泪掀,道長(zhǎng)抽兆,這世上最難降的妖魔是什么? 我笑而不...
- 正文 為了忘掉前任族淮,我火速辦了婚禮辫红,結(jié)果婚禮上咒程,老公的妹妹穿的比我還像新娘偷崩。我一直安慰自己,他們只是感情好只磷,可當(dāng)我...
- 文/花漫 我一把揭開白布蝙斜。 她就那樣靜靜地躺著名惩,像睡著了一般。 火紅的嫁衣襯著肌膚如雪孕荠。 梳的紋絲不亂的頭發(fā)上娩鹉,一...
- 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼呼寸!你這毒婦竟也來(lái)了艳汽?” 一聲冷哼從身側(cè)響起,我...
- 序言:老撾萬(wàn)榮一對(duì)情侶失蹤对雪,失蹤者是張志新(化名)和其女友劉穎河狐,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體瑟捣,經(jīng)...
- 正文 獨(dú)居荒郊野嶺守林人離奇死亡馋艺,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
- 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了蝶柿。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片丈钙。...
- 正文 年R本政府宣布星岗,位于F島的核電站,受9級(jí)特大地震影響戒洼,放射性物質(zhì)發(fā)生泄漏俏橘。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒙蒙 一圈浇、第九天 我趴在偏房一處隱蔽的房頂上張望寥掐。 院中可真熱鬧,春花似錦磷蜀、人聲如沸召耘。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)污它。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間衫贬,已是汗流浹背德澈。 一陣腳步聲響...
- 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像缝呕,于是被迫代替她去往敵國(guó)和親澳窑。 傳聞我的和親對(duì)象是個(gè)殘疾皇子斧散,可洞房花燭夜當(dāng)晚...
推薦閱讀更多精彩內(nèi)容
- 新愛蓮說Hélène, je m'appelle Hélène/Hélène Rollès 蓍草填詞/江北客@伏羲...