00001
00002
00003
00004
00005
00006
00007 #ifndef PSGFX_H
00008 #define PSGFX_H
00009
00010 #include "psPoly.h"
00011
00012 struct psGfx
00013
00014 {
00015 FILE *f;
00016 double userWidth, userHeight;
00017 double ptWidth, ptHeight;
00018 double xScale, yScale;
00019 double xOff, yOff;
00020 double fontHeight;
00021 };
00022
00023 struct psGfx *psOpen(char *fileName,
00024 double userWidth, double userHeight,
00025 double ptWidth, double ptHeight,
00026 double ptMargin);
00027
00028
00029
00030 void psClose(struct psGfx **pPs);
00031
00032
00033 void psTranslate(struct psGfx *ps, double xTrans, double yTrans);
00034
00035
00036 void psClipRect(struct psGfx *ps, double x, double y,
00037 double width, double height);
00038
00039
00040 void psDrawBox(struct psGfx *ps, double x, double y,
00041 double width, double height);
00042
00043
00044 void psDrawLine(struct psGfx *ps, double x1, double y1,
00045 double x2, double y2);
00046
00047
00048 void psFillUnder(struct psGfx *ps, double x1, double y1,
00049 double x2, double y2, double bottom);
00050
00051
00052
00053
00054
00055 void psXyOut(struct psGfx *ps, double x, double y);
00056
00057
00058
00059
00060 void psWhOut(struct psGfx *ps, double width, double height);
00061
00062
00063 void psMoveTo(struct psGfx *ps, double x, double y);
00064
00065
00066 void psTextAt(struct psGfx *ps, double x, double y, char *text);
00067
00068
00069 void psTextDown(struct psGfx *ps, double x, double y, char *text);
00070
00071
00072 void psTextRight(struct psGfx *mg, double x, double y,
00073 double width, double height, char *text);
00074
00075
00076 void psTextCentered(struct psGfx *mg, double x, double y,
00077 double width, double height, char *text);
00078
00079
00080 void psTimesFont(struct psGfx *ps, double size);
00081
00082
00083 void psSetColor(struct psGfx *ps, int r, int g, int b);
00084
00085
00086 void psSetGray(struct psGfx *ps, double grayVal);
00087
00088
00089 void psPushG(struct psGfx *ps);
00090
00091
00092 void psPopG(struct psGfx *ps);
00093
00094
00095 void psDrawPoly(struct psGfx *ps, struct psPoly *poly, boolean filled);
00096
00097
00098 void psFillEllipse(struct psGfx *ps, double x, double y, double xrad, double yrad);
00099
00100 void psDrawEllipse(struct psGfx *ps, double x, double y, double xrad, double yrad,
00101 double startAngle, double endAngle);
00102
00103 char * convertEpsToPdf(char *epsFile);
00104
00105
00106 #endif
00107