#include <stdio.h>#include <math.h>#include "xfig.h"Include dependency graph for xfig.c:

Go to the source code of this file.
Defines | |
| #define | ARROWRATIO 3.0 |
| #define | ARROWHW 0.5 |
Functions | |
| void | XfigStartCompound (FILE *fptr, int ix1, int iy1, int ix2, int iy2) |
| void | XfigEndCompound (FILE *fptr) |
| void | XfigPolyLine (FILE *fptr, int *x, int *y, int npoints, int linestyle, int thickness, int color) |
| void | XfigVector (FILE *fptr, int x, int y, int fx, int fy, int linestyle, int thickness, int color) |
| void | XfigLine (FILE *fptr, int x, int y, int x1, int y1, int linestyle, int thickness, int color) |
| void | XfigBox (FILE *fptr, int ix1, int iy1, int ix2, int iy2, int linestyle, int thickness, int color) |
| void | XfigCircle (FILE *fptr, int x, int y, int radius, int linestyle, int thickness, int color) |
| void | XfigText (FILE *fptr, int x, int y, int sub_type, int font, int font_size, int color, float angle, char *text) |
|
|
Definition at line 6 of file xfig.c. Referenced by XfigVector(). |
|
|
Definition at line 5 of file xfig.c. Referenced by XfigVector(). |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 62 of file xfig.c. References XFIG_BOX_TYPE, XFIG_END_POLY, and XFIG_NOT_FILLED. Referenced by printfree().
00064 {
00065 fprintf(fptr, "%d %d %d %d %d 0 -1 %d %f 0 0 0\n",
00066 XFIG_BOX_TYPE, XFIG_BOX_TYPE,
00067 linestyle, thickness, color, XFIG_NOT_FILLED, 0.0);
00068 fprintf(fptr, "%d %d %d %d %d %d %d %d %d %d %d %d\n",
00069 ix1, iy1, ix1, iy2, ix2, iy2, ix2, iy1, ix1, iy1,
00070 XFIG_END_POLY, XFIG_END_POLY);
00071 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 74 of file xfig.c. References XFIG_BLACK_FILLED, and XFIG_ELLIPSE_TYPE. Referenced by printfree().
00076 {
00077 fprintf(fptr, "%d 3 %d %d %d 0 -1 %d %f 1 0.0 %d %d %d %d %d %d %d %d\n",
00078 XFIG_ELLIPSE_TYPE, linestyle, thickness, color, XFIG_BLACK_FILLED,
00079 0.0,
00080 x, y, radius, radius, x, y, x + radius, y);
00081 }
|
|
|
Definition at line 15 of file xfig.c. References XFIG_COMPOUND. Referenced by main().
00016 {
00017 fprintf(fptr, "%d\n", - XFIG_COMPOUND);
00018 }
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 51 of file xfig.c. References XFIG_END_POLY, XFIG_NOT_FILLED, XFIG_POLY_TYPE, and XFIG_POLYLINE. Referenced by main(), and printfree().
00053 {
00054 fprintf(fptr, "%d %d %d %d %d 0 -1 %d %f 0 0 0\n",
00055 XFIG_POLYLINE, XFIG_POLY_TYPE, linestyle, thickness, color,
00056 XFIG_NOT_FILLED, 0.0);
00057 fprintf(fptr, "%d %d %d %d %d %d\n", x, y, x1, y1,
00058 XFIG_END_POLY, XFIG_END_POLY);
00059 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 21 of file xfig.c. References XFIG_END_POLY, XFIG_NOT_FILLED, XFIG_POLY_TYPE, and XFIG_POLYLINE. Referenced by printfree().
00023 {
00024 int i;
00025 fprintf(fptr, "%d %d %d %d %d 0 -1 %d %f 0 0 0\n",
00026 XFIG_POLYLINE, XFIG_POLY_TYPE, linestyle, thickness, color,
00027 XFIG_NOT_FILLED, 0.0);
00028 for (i = 0; i < npoints; i++)
00029 fprintf(fptr, "%d %d\n", x[i], y[i]);
00030 fprintf(fptr, "%d %d\n", XFIG_END_POLY, XFIG_END_POLY);
00031 }
|
|
||||||||||||||||||||||||
|
Definition at line 8 of file xfig.c. References XFIG_COMPOUND. Referenced by main().
00009 {
00010 fprintf(fptr, "%d %d %d %d %d\n", XFIG_COMPOUND,
00011 ix1, iy1, ix2, iy2);
00012 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 84 of file xfig.c. References XFIG_TEXT_TYPE. Referenced by main(), and printfree().
00086 {
00087 fprintf(fptr, "%d %d %d %d -1 %d 0 %f %d %d %d %d %d %s\1\n",
00088 XFIG_TEXT_TYPE, sub_type, font, font_size, color, angle,
00089 4, font_size, strlen(text)*font_size, x, y, text);
00090 }
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 34 of file xfig.c. References ARROWHW, ARROWRATIO, XFIG_END_POLY, XFIG_NOT_FILLED, XFIG_POLY_TYPE, and XFIG_POLYLINE. Referenced by printfree().
00036 {
00037 double fl, arrowheight;
00038
00039 fprintf(fptr, "%d %d %d %d %d 0 -1 %d %f 0 1 0\n",
00040 XFIG_POLYLINE, XFIG_POLY_TYPE, linestyle, thickness, color,
00041 XFIG_NOT_FILLED, 0.0);
00042 fl = sqrt(fx*fx + fy*fy);
00043 arrowheight = fl/ARROWRATIO;
00044 fprintf(fptr, "-1 -1 %.3f %.3f %.3f\n", 1.0,
00045 ARROWHW*arrowheight, arrowheight);
00046 fprintf(fptr, "%d %d %d %d %d %d\n", x, y, x + fx, y + fy,
00047 XFIG_END_POLY, XFIG_END_POLY);
00048 }
|
1.2.18