1 /* This example demonstrates adding a text object to a Tecplot
5 #pragma warning (disable: 4996) /* Windows strcpy warning off */
8 /* DOCSTART:tectxt.txt*/
14 /* Open the file & write the datafile header information */
16 INTEGER4 VIsDouble
= 0;
17 INTEGER4 FileType
= 0;
18 INTEGER4 I
= 0; /* used to check the return value */
20 I
= TECINI112((char*)"Text",
28 /* Specify the X, Y and Z position of the anchor point */
31 double ZPos
= 0.0; /* N/A for 2D text */
33 INTEGER4 PosCoordMode
= 0; /* use grid coordinates */
35 /* opt not to attach the text to a given zone. When text is
36 * attached to a given zone, it is displayed only when the zone
39 INTEGER4 AttachToZone
= 0;
43 /* Specify the font values */
44 INTEGER4 Font
= 1; /* Helvetica Bold */
45 INTEGER4 FontHeightUnits
= 2; /* in grid coordinates */
46 double FontHeight
= 18;
48 /* Set the box style parameters */
49 INTEGER4 BoxType
= 1; /* filled box */
50 double BoxMargin
= .5; /* margin between the text
53 double BoxLineThickness
= .1;
54 INTEGER4 BoxColor
= 0; /* set the box line color
57 INTEGER4 BoxFillColor
= 1; /* set the box fill color
61 /* set the font properties */
62 double Angle
= 30; /* angle of the text */
63 INTEGER4 Anchor
= 1; /* set the anchor point to
64 * the center of the text
67 double LineSpacing
= 1.5;
68 INTEGER4 TextColor
= 7; /* set the font color to
72 INTEGER4 Scope
= 1; /* set the text to "local",
73 * i.e. available in the
76 INTEGER4 Clipping
= 1;
81 strcpy(Text
, "Sample Text");
82 strcpy(MFC
, "My Macro");