This is contour.h in view mode; [Download] [Up]
/* contour.h */ #import <appkit/color.h> #define epsilon .0002 /* Each contour path found is stored in this structure */ typedef struct contour_path { struct contour_path *next; /* pointer to next contour path */ float *x; /* X coordinate array */ float *y; /* Y coordinate array */ float level; /* contour's level */ int num_pts; /* # of points in this path */ int closed; /* non-zero if contour is closed */ int levelindex; /* levelindex-th contour level */ int hi_inside; /* non-zero if inside contour is going up */ } ContourPath; /* User specified attribute for each contour level */ typedef struct contour_attribute { float level; /* value of contour level */ float linewidth; /* line width */ int dash; /* dash type */ int anotate; /* non-zero if this contour should be annotated */ NXColor linecolor; /* color of contour line */ NXColor fillcolor_hi; /* color of fill when inside is higher */ NXColor fillcolor_lo; /* color of fill when inside is lower */ } CntrAttribute; int computeContour(id vObj, int nx, int ny, float *x, float *y, float *f, int ncont, CntrAttribute *cAttr); void sort_contourList(ContourPath *cntrList, float xxmin, float xxmax, float yymin, float yymax, int nContours, ContourPath **SCntrPtr); int non_zero_winding(float xp, float yp, float *x, float *y, int n_path);
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.