Previous Next Up Title Contents Index Functions Index Top Library

2D CONTOUR LINES PARAMETERS

tset_isolines_annot


CALL SEQUENCE

void tset_isolines_annot (annot_flag, annot_attr)

INPUT PARAMETERS

Tiso_annot_flag	annot_flag;
Tiso_annot_attr	*annot_attr;

ARGUMENTS

annot_flag
Visibility flag for annotations:
annot_attr
2D contour line annotation attributes

TYPE

typedef struct {
	TANNOT_OFF,
	TANNOT_ON
} Tiso_annot_flag;

typedef struct {
	Pint			period_iso;
	Pint			first_iso;
	Tiso_annot_path		path;
	Tiso_annot_cross_status	cross_status;
	Tbackground_flag	background_flag;
	Pclip_ind			clip_ind;
	Pfloat			curvilinear_dist;
	Ppoint_list		*clip_polygon;
	Pfloat			char_height;
} Tiso_annot_attr;

typedef enum {
	TANNOT_PATH_HOR,
	TANNOT_PATH_VERT,
	TANNOT_PATH_TANG
} Tiso_annot_path;

typedef enum {
	TANNOT_CROSS_ISO,
	TANNOT_CROSS_SUB_ISO,
	TANNOT_DONT_CROSS_ISO
} Tiso_annot_cross_status;
typedef enum {
	TNO_BACKGROUND,
	TBACKGROUND
} Tbackground_flag;

EFFECT

This function defines appearence of annotated contour lines created by tisolines, tisolines_line, and tisolines_colr_line. The contour lines are gathered in two groups : annotated ones (main contour lines) and the one without annotation (secondary contour lines). Tiso_annot_attr parameter defines contour lines attributes and defines also main and secondary contour lines.

Whatever is the choosen appearence :

Multiple annotations may be drawn on a single contour line depending on curvilinear_dist parameter.

period_iso and first_iso define main and secondary contour lines. period_iso is the main contour line period and first_iso is the first main contour line. Ex if period_iso = 2 and first_iso = 3, and if V1,V2,V3,V4,V5,V6,V7,V8,V9 are ordered contour values then contour lines V3, V5, V7 and V9 are main contour lines, others are secondary ones.

path defines annotation path : annotations may be horizontal (TANNOT_PATH_HOR), vertical (TANNOT_PATH_VERT), or tangent to contour lines (TANNOT_PATH_TANG)

cross_status controls overlapping of contour lines and annotations: If cross_status = TANNOT_CROSS_ISO an annotation may overlap with other contour lines. If cross_status = TANNOT_CROSS_SUB_ISO, annotations cannot overlap with a main contour line, but can with a secondary one,. If cross_status = TANNOT_DONT_CROSS_ISO, annotations cannot overlap with another contour line. cross_status is to find the right balance between legibility of annotations and the number of contour lines. cross_status value and overlap control can result in non-annotated contour lines. Computing is the slowest using TANNOT_DONT_CROSS_IS0, and the fastest using TANNOT_CROSS_ISO.

background_flag allows to draw the bounding box of the annotations. (TNO_BACKGROUND or TBACKGROUND).

clipping_flag allows to clip contour lines relating to annotation bounding box (PIND_NO_CLIP or PIND_CLIP). Clipping is usefull when annotation bounding box is not to be drawn (TNO_BACKGROUND)

curvilinear_dist is the curvlinear spacing between two annotations of a same contour line defined in the range 0 to 1, it is a scaling factor applied to the current domain (see. tdomain and tdomain3), or applied to the clipping polygon clip_polygon (see below). The real spacing is curvilinear_dist × [delta]s where [delta]s is the maximum value between the height and width of the current domain or the clipping polygon.

clip_polygon defines a polygon. Outside of this polygon no annotation will be drawn. If clip_polygon = 0, the clipping polygon is the mesh border line.

char_height is the character height of annotations defined in the range 0 to 1, it is a scaling factor applied to the current domain (see. tdomain and tdomain3), or applied to the clipping polygon clip_polygon (see above). The real height is char_height × [delta]s where [delta]s is the maximum value between the height and width of the current domain or the clipping polygon.

Remarks :

Computing time depends on the number of constraints given to draw annotations. This time may increase in following cases:

- cross_status = TANNOT_DONT_CROSS_ISO

and/or

- clipping_flag = PIND_CLIP

and/or

- curvilinear_dist is close to 0 (a lot of annotations have to be drawn on each contour line).

The best time performance can be achieved using following contraints :

cross_status = TANNOT_CROSS_ISO and clipping_flag = PIND_NO_CLIP and

curvilinear_dist = 1.

If tset_isolines_annot function is not called then default attributes are as following:

period_iso : 3

first_iso : 1

path : TANNOT_PATH_TANG

cross_status : TANNOT_CROSS_ISO

background_flag: TNO_BACKGROUND

clipping_flag : PIND_NO_CLIP

curvilinear_dist: 1.0

clip_polygon : 0

char_height : 0.025

If annot_attr = 0 (NULL pointer), annotation attributes keep thier current values.

Example of annotated contour lines with the following parameters :

period_iso : 2

first_iso : 1

path : TANNOT_PATH_TANG

cross_status : TANNOT_CROSS_SUB_ISO

background_flag: TNO_BACKGROUND

clipping_ind : PIND_CLIP

curvilinear_dist: 0.35

clip_polygon : 0

char_height : 0.013


Previous Next Up Title Contents Index Functions Index Top Library