home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula
/
nebula.bin
/
SourceCode
/
Classes
/
ContourView
/
ContourView.h
< prev
next >
Wrap
Text File
|
1992-12-03
|
4KB
|
100 lines
/* ContourView.h -- header file for ContourView class
* Start 92-05-18
* Izumi Ohzawa
*/
#import <objc/objc.h> /* for BOOL values YES, NO */
#import <appkit/View.h>
#import <appkit/color.h>
#import <dpsclient/dpsfriends.h>
#import "contour.h"
@interface ContourView:View
{
// storage for scaling factors
float pXmin, pXmax; // X bounds of view in points
float pYmin, pYmax; // Y bounds of view in points
float ppxu; // pixels(points) per unit of X
float ppyu; // pixels(points) per unit of Y
float xdmin, xdmax; // min, max values of X data
float ydmin, ydmax; // min, max values of Y data
float fdmin, fdmax; // min, max values of Value
int nclevels; // # of contour levels
CntrAttribute *cA; // Array of Contour attribute structures
int numContours; /* number of contours in contourList */
ContourPath *contourList; /* contour path list */
ContourPath **SortedCntrPtr; /* sorted index: array of pointers to contourList */
// grid and value data storage
int ndata; // total number of data points = jdim*kdim
int nx; // expanded (nx1+N6)
int ny; // (ny1+N6)
int nx1; // non-expanded
int ny1;
float *xd; // x coordinate array for grid points
float *yd; // y coordinate array for gird points
float *fd; // value at grid point (x[i], y[i]), i=(0 .. ndata-1)
int bipolar; // =1 if data are pos/neg, =0 if monopolar
float basevalue; // value to set to margin regions of expanded array for contour closure
// Flags
int ClearFlag;
BOOL debug;
BOOL doFill;
BOOL frameON; // Draw bounds frame
float frameLineWidth;
int minNumPoints; // minimum mumber of points for a contour
// Attributes of contour lines and fills
NXColor positiveColor; // color of maximum positive (or max monopolar)
NXColor negativeColor; // color of extreme negative
NXColor backgroundColor; // color of background
NXColor contourLineColor; // color of contour lines
NXColor frameColor; // color of frame rectangle (when enabled)
float minorContourLineWidth; // linewidth of contour lines
float majorContourLineWidth; // major contour's line width
}
- initFrame:(NXRect *)nf;
- free;
- (BOOL)acceptsFirstMouse;
- (BOOL)acceptsFirstResponder;
- setScaleXY:(float)xmin :(float)xmax :(float)ymin :(float)ymax;
- findMinMax:(float *)x :(int)npts :(float *)vmin :(float *)vmax;
- setDebugEnable:(BOOL)de;
- setFillEnable:(BOOL)fe;
- setNumberOfContourLevels:(int)nl;
- setMinMaxOfContourLevels:(float)min :(float)max;
- setContourAttributeArray:(CntrAttribute *)caa :(int)nl;
- setDefaultContourAttributes;
- setContourLineColor:(NXColor)clc;
- setFrameColor:(NXColor)fc;
- setBackgroundColor:(NXColor)bc;
- setFillColors:(NXColor)pe :(NXColor)ne;
- setCartesianGridData:(float *)f :(float)xmin :(float)xmax
:(float)ymin :(float)ymax
ofSize:(int)nnx :(int)nny
withInterpolationTo:(int)n1x :(int)n1y;
- setGridAndValueData:(float *)x :(float *)y :(float *)f ofSize:(int)nnx :(int)nny;
- setFrameEnable:(BOOL)fflag lineWidth:(float)fw;
- setContourLineWidthMinor:(float)clw andMajor:(float)clwm;
- setMinNumberOfPointsPerContour:(int)mnp;
- clear:sender;
- copy:sender;
- copyPScode:sender;
- plotContour:(ContourPath *)cntr :(DPSContext)cContext;
- findInsideHighLow:(ContourPath *)cntr;
- (BOOL)pointInDomain:(float)xx :(float)yy;
- freeContourList;
// Call back method messaged from computeContour() function.
- accumContour:(int)icont :(int)np :(float *)xc :(float *)yc;
@end