-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawContentView.h
executable file
·67 lines (56 loc) · 1.84 KB
/
DrawContentView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// DrawContent.h
// DrawContent
//
// Created by Nikhil Gohil on 4/22/12.
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface DrawContentView : UIView {
CALayer *_baseLayer;
CAShapeLayer *_pathLayer;
UIColor *_lineColor;
CGFloat _lineSize;
NSString *_shapeName;
NSString *_fontTextName;
NSString *_messageText;
CGFloat _fontTextSize;
// Bezier points
CGPoint _firstPoint;
CGPoint _secondPoint;
CGPoint _thirdPoint;
CGPoint _fourthPoint;
CGPoint _fifthPoint;
CGPoint _sixthPoint;
//arc
CGFloat _arcAngle;
}
@property (nonatomic, retain) CALayer *baseLayer;
@property (nonatomic, retain) CALayer *pathLayer;
@property (nonatomic, retain) UIColor *lineColor;
@property (assign) CGFloat lineSize;
@property (nonatomic, retain) NSString *shapeName;
@property (nonatomic, retain) NSString *fontTextName;
@property (nonatomic, retain) NSString *messageText;
@property (assign) CGFloat fontTextSize;
// Bezier path
@property (assign) CGPoint firstPoint;
@property (assign) CGPoint secondPoint;
@property (assign) CGPoint thirdPoint;
@property (assign) CGPoint fourthPoint;
@property (assign) CGPoint fifthPoint;
@property (assign) CGPoint sixthPoint;
-(void)drawWithBezierPath:(UIBezierPath*)path withColor:(UIColor*)pathColor withLineWidth:(CGFloat)lineSize;
-(void)drawTextWithText:(NSString*)message withFontSize:(CGFloat)fontSize withFillColor:(UIColor*)fillColor withLineColor:(UIColor*)lineColor withLineWidth:(CGFloat)lineSize;
-(void)startAnimationWithDuration:(CGFloat)duration;
-(void)clearArea;
-(void)startDrawingContent;
-(void)drawingText;
-(void)drawingShapes;
-(UIBezierPath*)quadCurveRawBezierPath;
-(UIBezierPath*)rightBezierPath;
-(UIBezierPath*)crossBezierPath;
-(UIBezierPath*)pentagonBezierPath;
-(UIBezierPath*)arcBezierPath;
-(UIBezierPath*)cubicCurveBezierPath;
-(UIBezierPath*)quadCurveBezierPath;
@end