136 #define TRANS_TABLE "HPGL.ftr"
224 sGraph.xmin = DataXMin;
225 sGraph.ymin = DataYMin;
227 sGraph.XPScale = 1.0 / (DataXMax - DataXMin);
228 sGraph.YPScale = 1.0 / (DataYMax - DataYMin);
236 return(
blPSInit(filename, title, AltFont));
238 return(
blHPGLInit(filename, AltFont, xmargin, ymargin));
264 static REAL pens[
MAXPEN] = {0.5, 0.75, 1.0, 1.25, 1.5, 1.75};
313 x = (x-sGraph.xmin) * sGraph.XPScale;
314 y = (y-sGraph.ymin) * sGraph.YPScale;
319 x = (x-sGraph.xmin) * sGraph.XPScale;
320 y = (y-sGraph.ymin) * sGraph.YPScale;
357 x = (x-sGraph.xmin) * sGraph.XPScale;
359 y = (y-sGraph.ymin) * sGraph.YPScale;
364 x = (x-sGraph.xmin) * sGraph.XPScale;
366 y = (y-sGraph.ymin) * sGraph.YPScale;
395 static char PSPattern[6][16] = {
"",
527 x = (x-sGraph.xmin) * sGraph.XPScale;
528 y = (y-sGraph.ymin) * sGraph.YPScale;
533 x = (x-sGraph.xmin) * sGraph.XPScale;
534 y = (y-sGraph.ymin) * sGraph.YPScale;
575 x = (x-sGraph.xmin) * sGraph.XPScale;
576 y = (y-sGraph.ymin) * sGraph.YPScale;
581 x = (x-sGraph.xmin) * sGraph.XPScale;
582 y = (y-sGraph.ymin) * sGraph.YPScale;
627 x = (x-sGraph.xmin) * sGraph.XPScale;
628 y = (y-sGraph.ymin) * sGraph.YPScale;
633 x = (x-sGraph.xmin) * sGraph.XPScale;
634 y = (y-sGraph.ymin) * sGraph.YPScale;
677 x = (x-sGraph.xmin) * sGraph.XPScale;
678 y = (y-sGraph.ymin) * sGraph.YPScale;
683 x = (x-sGraph.xmin) * sGraph.XPScale;
684 y = (y-sGraph.ymin) * sGraph.YPScale;
731 x = (x-sGraph.xmin) * sGraph.XPScale;
733 y = (y-sGraph.ymin) * sGraph.YPScale;
738 x = (x-sGraph.xmin) * sGraph.XPScale;
740 y = (y-sGraph.ymin) * sGraph.YPScale;
808 static int NTrans = 0;
821 for(i=0; i<NTrans; i++)
823 if(FontTable[i].PSFont)
825 free(FontTable[i].PSFont);
826 FontTable[i].PSFont =
NULL;
850 while(fgets(buffer,
MAXBUFF-1,fp))
853 sscanf(buffer,
"%s %d",FontName,&FontNum);
855 if(strlen(FontName) && FontName[0] !=
'!')
858 FontTable[NTrans].PSFont =
859 (
char *)malloc((strlen(FontName)+1) *
sizeof(char));
862 if(FontTable[NTrans].PSFont ==
NULL)
break;
869 FontTable[NTrans].HPGLFont = FontNum;
887 for(i=0; i<NTrans; i++)
889 if(!strcmp(ptr, FontTable[i].PSFont))
891 return(FontTable[i].HPGLFont);
917 static char retstring[
MAXBUFF];
921 if(strlen(
string) >
MAXBUFF-1)
return(
string);
924 for(i=0, j=0; i<strlen(
string) && j<
MAXBUFF-1; i++)
929 retstring[j++] =
string[++i];
932 if(
string[++i] ==
'{')
933 while(
string[++i] !=
'}' &&
string[i] !=
'\0' && j<MAXBUFF-1)
934 retstring[j++] =
string[i];
936 retstring[j++] =
string[i];
939 if(
string[++i] ==
'{')
940 while(
string[++i] !=
'}' &&
string[i] !=
'\0' && j<MAXBUFF-1)
941 retstring[j++] =
string[i];
943 retstring[j++] =
string[i];
946 retstring[j++] =
string[i];
void blAMLCText(int dest, REAL x, REAL y, char *text)
void blPSLCText(REAL X, REAL Y, char *label)
void blHPGLCTText(REAL x, REAL y, REAL offset, char *text)
void blPSSetDash(char *linepatt)
char * blKillLeadSpaces(char *string)
void blPSThick(REAL thickness)
void blPSFont(char *fontname, REAL size)
char * blSimplifyText(char *string)
void blHPGLCBText(REAL x, REAL y, REAL offset, char *text)
void blPSLText(REAL X, REAL Y, char *label)
void blAMRText(int dest, REAL x, REAL y, REAL offset, char *text)
void blHPGLSetDash(int style)
void blAMSetPen(int dest, int pen)
Include file for using plotting routines.
void blPSCBText(REAL X, REAL Y, REAL Offset, char *label)
BOOL blAMInitPlot(char *filename, char *title, int dest, REAL OutXSize, REAL OutYSize, REAL OutXOff, REAL OutYOff, char *AltFont, REAL xmargin, REAL ymargin, REAL DataXMin, REAL DataYMin, REAL DataXMax, REAL DataYMax)
void blAMEndPlot(int dest)
void blAMEndLine(int dest)
void blHPGLROffText(REAL x, REAL y, REAL offset, char *text)
void blPSROffText(REAL X, REAL Y, REAL offset, char *label)
void blHPGLMove(REAL x, REAL y)
int blPS2HPGLFont(char *font)
void blPSDraw(REAL X, REAL Y)
void blHPGLLText(REAL x, REAL y, char *string)
Header file for general purpose routines.
void blAMDraw(int dest, REAL x, REAL y)
void blAMCBText(int dest, REAL x, REAL y, char *text)
void blAMMove(int dest, REAL x, REAL y)
System-type variable type definitions.
void blPSMove(REAL X, REAL Y)
void blAMSetFont(int dest, char *PSFontName, REAL FontSize)
BOOL blPSInit(char *FName, char *creator, char *AltFont)
void blHPGLLCText(REAL x, REAL y, char *text)
void blPSCTText(REAL X, REAL Y, REAL Offset, char *label)
Type definitions for maths.
void blStringToLower(char *string1, char *string2)
BOOL blHPGLInit(char *filename, char *AltFont, REAL xmargin, REAL ymargin)
void blHPGLDraw(REAL x, REAL y)
void blHPGLFont(int font, REAL size)
void blAMText(int dest, REAL x, REAL y, char *text)
void blAMSetLineStyle(int dest, int style)
void blAMCTText(int dest, REAL x, REAL y, REAL CTOffset, char *text)