forked from Boris-Em/BEMSimpleLineGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBEMLine.h
85 lines (49 loc) · 1.76 KB
/
BEMLine.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//
// BEMLine.h
// SimpleLineGraph
//
// Created by Bobo on 12/27/13. Updated by Sam Spencer on 1/11/14.
// Copyright (c) 2013 Boris Emorine. All rights reserved.
// Copyright (c) 2014 Sam Spencer.
//
#if __has_feature(objc_modules)
// We recommend enabling Objective-C Modules in your project Build Settings for numerous benefits over regular #imports
@import Foundation;
@import UIKit;
@import CoreGraphics;
#else
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
#endif
/// Class to draw the line of the graph
@interface BEMLine : UIView
//----- POINTS -----//
/// The previous point. Necessary for Bezier curve
@property (assign, nonatomic) CGPoint P0;
/// The starting point of the line
@property (assign, nonatomic) CGPoint P1;
/// The ending point of the line
@property (assign, nonatomic) CGPoint P2;
/// The next point. Necessary for Bezier curve
@property (assign, nonatomic) CGPoint P3;
//----- COLORS -----//
/// The line color
@property (strong, nonatomic) UIColor *color;
/// The color of the area above the line, inside of its superview
@property (strong, nonatomic) UIColor *topColor;
/// The color of the area below the line, inside of its superview
@property (strong, nonatomic) UIColor *bottomColor;
//----- ALPHA -----//
/// The line alpha
@property (nonatomic) float lineAlpha;
/// The alpha value of the area above the line, inside of its superview
@property (nonatomic) float topAlpha;
/// The alpha value of the area below the line, inside of its superview
@property (nonatomic) float bottomAlpha;
//----- SIZE -----//
/// The width of the line
@property (nonatomic) float lineWidth;
//----- BEZIER CURVE -----//
@property (nonatomic) BOOL bezierCurveIsEnabled;
@end