-
Notifications
You must be signed in to change notification settings - Fork 3
/
XN2DPlot.h
55 lines (41 loc) · 1.37 KB
/
XN2DPlot.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
//
// XN2DPlot.h
// XNMaths
//
// XN2DPlot class.
//
// Created by Нат Гаджибалаев on 23.11.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#pragma mark -
#pragma mark Imports
#import <Cocoa/Cocoa.h>
#import "XN2DPoint.h"
@class XNFloatRange;
@class XNLineData;
@class XNFunction;
@class XNPlotManager;
#pragma mark -
#pragma mark XN2DPlot interface
@interface XN2DPlot : NSObject {
// show this range
XNFloatRange *xRange, *yRange;
// label to draw
NSString *label;
// quality of functions
NSUInteger quality;
// ready to accept render calls?
BOOL isReadyToRender;
}
#pragma mark -
#pragma mark Init methods
+ (XN2DPlot*) plotInRect: (NSRect)rect label: (NSString*)newTitle quality: (NSUInteger)newQuality;
- (XN2DPlot*) initInRect: (NSRect)rect label: (NSString*)newTitle quality: (NSUInteger)newQuality;
#pragma mark -
#pragma mark Drawing API
- (void) renderFunction: (XNFunction *) aFunction range: (XNFloatRange *) range color: (NSColor *) color width: (NSUInteger) width;
- (void) renderPoint: (XN2DPoint) point color: (NSColor*)color;
- (void) renderPoints: (NSArray*) arrayOfPoints color: (NSColor*)color;
- (void) renderPointsWithX: (CGFloat*)x y: (CGFloat*)y count: (NSUInteger)count color: (NSColor*) color;
- (void) renderLine: (XNLineData *)lineData color: (NSColor *) color width: (NSUInteger) width;
@end