-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphView.h
More file actions
71 lines (57 loc) · 2.08 KB
/
GraphView.h
File metadata and controls
71 lines (57 loc) · 2.08 KB
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
//
// GraphView.h
// Metasome
//
// Created by Omar Metwally on 8/21/13.
// Copyright (c) 2013 Logisome. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "MetasomeParameter.h"
// Based on MetasomeParameter.h
/*
typedef enum {
sliderInput,
integerInput,
floatInput
} ParameterInputType;
*/
@class LineView, Legend, GraphViewController;
@interface GraphView : UIScrollView
{
ParameterInput inputType;
UIWindow *thisWindow;
}
@property NSString *name;
@property (nonatomic) int scrollViewWidth;
@property (nonatomic) int scrollViewHeight;
//for scaling along the horizontal axis (i.e. along the screen's y-axis)
@property (nonatomic) float horizontalScaleFactor;
//for scaling along the vertical axis (i.e. along the screen's x-axis)
@property (nonatomic) float verticalScaleFactor;
@property (nonatomic) float minValueOnHorizontalAxis;
@property (nonatomic) float maxValueOnHorizontalAxis;
@property (nonatomic) float minValueOnVerticalAxis;
@property (nonatomic) float maxValueOnVerticalAxis;
@property (nonatomic) float originHorizontalOffset;
@property (nonatomic) float originVerticalOffset;
@property (nonatomic) float topBuffer, bottomBuffer, rightBuffer, leftBuffer;
@property (nonatomic) float horizontalAxisLength, verticalAxisLength;
@property (nonatomic, strong) NSString *graphTitle;
@property (nonatomic) CGContextRef ctx;
@property (nonatomic) CGContextRef parentContext;
@property (nonatomic) CGAffineTransform transform;
@property (nonatomic, copy) void (^clearSubviewBlock)(void);
@property (nonatomic, copy) NSMutableArray *pointsToGraph;
@property (nonatomic, weak) GraphViewController *parentGraphViewController;
@property (nonatomic, strong) Legend *legend;
@property (nonatomic) BOOL drawEventsFlag;
@property (nonatomic, copy) NSMutableArray *dataPointCoordinates;
@property (nonatomic) int selectedPointIndex;
-(void)initializeGraphView;
-(void)generateAxisLabels;
-(void)drawAxes;
-(void)convertDataPointsToCoordinates:(NSMutableArray *)dataPoints;
-(void)showMenuAtPoint:(NSValue *)point;
-(void)deletePoint;
@end