version 1.1.1.1, 2000/01/09 17:01:16 |
version 1.1.1.3, 2003/09/15 07:09:39 |
|
|
/*{{{}}}*/ |
/* |
/***************************************************************************/ |
* $Id$ |
/* */ |
*/ |
/* $Id$ */ |
|
/* */ |
|
/***************************************************************************/ |
|
/* GNUPLOT - tgif.trm */ |
|
|
|
|
/* GNUPLOT - tgif.trm */ |
|
|
/*[ |
/*[ |
* Copyright 1990 - 1993, 1998 |
* Copyright 1990 - 1993, 1998 |
|
|
/* PostScript terminal */ |
/* PostScript terminal */ |
/* - I left the %.1f format for pixel positions, but I think */ |
/* - I left the %.1f format for pixel positions, but I think */ |
/* Tgif does only calculate with integer positions */ |
/* Tgif does only calculate with integer positions */ |
|
/* */ |
|
/* Modified 07 July 2000 by Ian MacPhedran */ |
|
/* - added PM3D support */ |
|
|
|
|
/***************************************************************************/ |
/***************************************************************************/ |
|
|
/*}}} */ |
/*}}} */ |
Line 88 TERM_PUBLIC void TGIF_point __PROTO((unsigned int ux, |
|
Line 87 TERM_PUBLIC void TGIF_point __PROTO((unsigned int ux, |
|
TERM_PUBLIC void TGIF_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, TBOOLEAN head)); |
TERM_PUBLIC void TGIF_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, TBOOLEAN head)); |
TERM_PUBLIC int TGIF_set_font __PROTO((char *font)); |
TERM_PUBLIC int TGIF_set_font __PROTO((char *font)); |
TERM_PUBLIC void TGIF_set_pointsize __PROTO((double size)); |
TERM_PUBLIC void TGIF_set_pointsize __PROTO((double size)); |
|
#ifdef PM3D |
|
TERM_PUBLIC int TGIF_make_palette (t_sm_palette *); |
|
/* TERM_PUBLIC void TGIF_previous_palette (void); */ |
|
TERM_PUBLIC void TGIF_set_color (double); |
|
TERM_PUBLIC void TGIF_filled_polygon (int, gpiPoint *); |
|
#endif /* PM3D */ |
/*}}} */ |
/*}}} */ |
/* default length for static strings */ |
/* default length for static strings */ |
#define TGIF_STRLEN_MAX 255 |
#define TGIF_STRLEN_MAX 255 |
Line 113 TERM_PUBLIC void TGIF_set_pointsize __PROTO((double si |
|
Line 118 TERM_PUBLIC void TGIF_set_pointsize __PROTO((double si |
|
#define TGIF_VTIC (TGIF_YMAX/80) |
#define TGIF_VTIC (TGIF_YMAX/80) |
#define TGIF_HTIC (TGIF_YMAX/80) |
#define TGIF_HTIC (TGIF_YMAX/80) |
|
|
|
#ifdef PM3D |
|
static int TGIF_palette_set = FALSE; /* PM3D Palette Set ? */ |
|
static int TGIF_palette_size = 128; /* Number of colours in palette */ |
|
/* unused (joze) */ |
|
#if 0 |
|
static int TGIF_palette_offst = 32; /* Offset from zero for user colours */ |
|
#endif |
|
static char TGIF_colours[128][8]; /* Colours */ |
|
#endif /* PM3D */ |
|
|
|
|
#define TGIF_MAXPOLY 100 |
#define TGIF_MAXPOLY 100 |
/*}}} */ |
/*}}} */ |
#define GOT_TGIF_PROTO |
#define GOT_TGIF_PROTO |
Line 165 static unsigned int uTextAngle[] = |
|
Line 180 static unsigned int uTextAngle[] = |
|
/* NL: Modified first value to 2 from 3 */ |
/* NL: Modified first value to 2 from 3 */ |
static unsigned int uLineThick[] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; |
static unsigned int uLineThick[] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; |
static unsigned int uLineStyle[] = { 0, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 }; |
static unsigned int uLineStyle[] = { 0, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 }; |
static char *psColors[] = |
static char *psColors[] = { |
{ |
"black", "black", /* border and x/y-zero-axes */ |
"black", "black", /* border and x/y-zero-axes */ |
"red", "green", "blue", "magenta", "cyan", "yellow", |
"red", "green", "blue", "magenta", "cyan", "yellow", |
"DarkSeaGreen", "HotPink", "black", "coral" |
"DarkSeaGreen", "HotPink", "black", "coral"}; |
}; |
|
|
#if 0 /* HBB: unused */ |
#if 0 /* HBB: unused */ |
static char *psFonts[] = |
static char *psFonts[] = { |
{"Times-Roman", "Courier", "Helvetica", "NewCenturySchlbk-Roman", "Symbol", NULL}; |
"Times-Roman", "Courier", "Helvetica", "NewCenturySchlbk-Roman", |
|
"Symbol", NULL |
|
}; |
|
|
static unsigned int psFontSizes[] = |
static unsigned int psFontSizes[] = { |
{ 8, 10, 11, 12, 14, 17, 18, 20, 24, 25, 34, 40, 45, 50 }; |
8, 10, 11, 12, 14, 17, 18, 20, 24, 25, 34, 40, 45, 50 |
|
}; |
#endif |
#endif |
|
|
static int iTgifPolyCount; |
static int iTgifPolyCount; |
Line 193 static void TGIF_flush_poly __PROTO((void)); |
|
Line 211 static void TGIF_flush_poly __PROTO((void)); |
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
static void TGIF_flush_poly() |
static void |
|
TGIF_flush_poly() |
{ |
{ |
int i; |
int i; |
|
|
Line 221 static void TGIF_flush_poly() |
|
Line 240 static void TGIF_flush_poly() |
|
} /* TGIF_flush_poly */ |
} /* TGIF_flush_poly */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_options() |
TERM_PUBLIC void |
|
TGIF_options() |
{ |
{ |
|
|
struct value a, b; |
struct value a, b; |
Line 355 TERM_PUBLIC void TGIF_options() |
|
Line 375 TERM_PUBLIC void TGIF_options() |
|
} |
} |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_init() |
TERM_PUBLIC void |
|
TGIF_init() |
{ |
{ |
|
|
if (multiplot) { |
if (multiplot) { |
Line 378 page(1,\"\").\n", |
|
Line 399 page(1,\"\").\n", |
|
iTgifPolyCount = 0; |
iTgifPolyCount = 0; |
uTgifPlotCount = 0; |
uTgifPlotCount = 0; |
uActPage = 1; |
uActPage = 1; |
|
#ifdef PM3D |
|
TGIF_palette_set = FALSE; /* PM3D Palette Set ? */ |
|
#endif /* PM3D */ |
|
|
} /* TGIF_init */ |
} /* TGIF_init */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_graphics() |
TERM_PUBLIC void |
|
TGIF_graphics() |
{ |
{ |
|
|
TGIF_flush_poly(); |
TGIF_flush_poly(); |
Line 401 TERM_PUBLIC void TGIF_graphics() |
|
Line 426 TERM_PUBLIC void TGIF_graphics() |
|
if (uTgifPlotCount < uTgifPlotsPerPage) |
if (uTgifPlotCount < uTgifPlotsPerPage) |
uTgifPlotCount++; |
uTgifPlotCount++; |
else { |
else { |
fprintf(stderr, "error: number of plots > plots per page\n"); |
fputs("error: number of plots > plots per page\n", stderr); |
return; |
return; |
} |
} |
|
|
Line 438 TERM_PUBLIC void TGIF_graphics() |
|
Line 463 TERM_PUBLIC void TGIF_graphics() |
|
} /* TGIF_graphics */ |
} /* TGIF_graphics */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_text() |
TERM_PUBLIC void |
|
TGIF_text() |
{ |
{ |
TGIF_flush_poly(); |
TGIF_flush_poly(); |
|
|
Line 447 TERM_PUBLIC void TGIF_text() |
|
Line 473 TERM_PUBLIC void TGIF_text() |
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_reset() |
TERM_PUBLIC void |
|
TGIF_reset() |
{ |
{ |
TGIF_flush_poly(); |
TGIF_flush_poly(); |
iTgifPolyCount = 0; |
iTgifPolyCount = 0; |
Line 462 TERM_PUBLIC void TGIF_reset() |
|
Line 489 TERM_PUBLIC void TGIF_reset() |
|
} /* TGIF_reset */ |
} /* TGIF_reset */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_linetype(linetype) |
TERM_PUBLIC void |
|
TGIF_linetype(linetype) |
int linetype; |
int linetype; |
{ |
{ |
unsigned int ult; |
unsigned int ult; |
|
|
} /* TGIF_linetype */ |
} /* TGIF_linetype */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_move(ux, uy) |
TERM_PUBLIC void |
|
TGIF_move(ux, uy) |
unsigned int ux, uy; |
unsigned int ux, uy; |
{ |
{ |
|
|
Line 506 unsigned int ux, uy; |
|
Line 535 unsigned int ux, uy; |
|
} /* TGIF_move */ |
} /* TGIF_move */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_vector(ux, uy) |
TERM_PUBLIC void |
|
TGIF_vector(ux, uy) |
unsigned int ux, uy; |
unsigned int ux, uy; |
{ |
{ |
|
|
Line 535 unsigned int ux, uy; |
|
Line 565 unsigned int ux, uy; |
|
} /* TGIF_vector */ |
} /* TGIF_vector */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_arrow(sx, sy, ex, ey, head) |
TERM_PUBLIC void |
|
TGIF_arrow(sx, sy, ex, ey, head) |
unsigned int sx, sy, ex, ey; |
unsigned int sx, sy, ex, ey; |
TBOOLEAN head; |
TBOOLEAN head; |
{ |
{ |
|
|
|
|
|
|
if (head) { |
if (head) { |
fprintf(gpoutfile, "poly('%s',%d,[\n\t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',%d,[\n\ |
|
\t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", |
sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); |
sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); |
} else { |
} else { |
fprintf(gpoutfile, "poly('%s',%d,[\n\t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',%d,[\n\ |
|
\t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n", |
sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); |
sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle); |
} |
} |
|
|
|
|
} /* TGIF_arrow */ |
} /* TGIF_arrow */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_put_text(ux, uy, str) |
TERM_PUBLIC void |
|
TGIF_put_text(ux, uy, str) |
unsigned int ux, uy; |
unsigned int ux, uy; |
char *str; |
char *str; |
{ |
{ |
|
|
return; |
return; |
|
|
|
|
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"text('%s',%u,%u,'%s',0,%u,1,%u,%u,1,55,119,%u,0,15,4,0,0,0,0,[\n\t\"%s\"]).\n", |
text('%s',%u,%u,'%s',0,%u,1,%u,%u,1,55,119,%u,0,15,4,0,0,0,0,[\n\t\"%s\"]).\n", |
sActColor, x, y, sActFont, uActFontSize, uActJust, uActAngle, uActNr, str); |
sActColor, x, y, sActFont, uActFontSize, uActJust, uActAngle, |
|
uActNr, str); |
|
|
uActNr += 2; |
uActNr += 2; |
|
|
|
|
} /* TGIF_put_text */ |
} /* TGIF_put_text */ |
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC int TGIF_text_angle(ang) |
TERM_PUBLIC int |
|
TGIF_text_angle(ang) |
int ang; |
int ang; |
{ |
{ |
uActAngle = uTextAngle[ang]; /* 0=waag. 1=senkrecht */ |
uActAngle = uTextAngle[ang]; /* 0=waag. 1=senkrecht */ |
|
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC int TGIF_justify_text(mode) |
TERM_PUBLIC int |
|
TGIF_justify_text(mode) |
enum JUSTIFY mode; |
enum JUSTIFY mode; |
{ |
{ |
uActJust = mode; |
uActJust = mode; |
Line 616 enum JUSTIFY mode; |
|
Line 655 enum JUSTIFY mode; |
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_point(ux, uy, number) |
TERM_PUBLIC void |
|
TGIF_point(ux, uy, number) |
unsigned int ux, uy; |
unsigned int ux, uy; |
int number; |
int number; |
{ |
{ |
double p; /* all pointtypes fit in a (x +/-p)x(y +/-p) box */ |
double p; /* all pointtypes fit in a (x +/-p)x(y +/-p) box */ |
|
|
double x, y; |
double x, y; |
|
|
|
|
number = number % 63; |
number = number % 63; |
switch (number) { |
switch (number) { |
case -1: |
case -1: |
/* HBB: corrected format string, shuts up gcc -Wall */ |
/* HBB: corrected format string, shuts up gcc -Wall */ |
fprintf(gpoutfile, "poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,1,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,1,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
sActColor, x, y, x + 1, y + 1, uActNr++); |
sActColor, x, y, x + 1, y + 1, uActNr++); |
break; |
break; |
case 0: |
case 0: |
Line 672 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
Line 713 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
case 2: |
case 2: |
/* star */ |
/* star */ |
/* taking thickness 2 for cross & plus & star */ |
/* taking thickness 2 for cross & plus & star */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n", |
sActColor, x, y - p - 1, x, y + p + 1, uActNr++); |
sActColor, x, y - p - 1, x, y + p + 1, uActNr++); |
fprintf(gpoutfile, "poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n", |
sActColor, x - p - 1, y, x + p + 1, y, uActNr++); |
sActColor, x - p - 1, y, x + p + 1, y, uActNr++); |
fprintf(gpoutfile, "poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, "poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y + p, x + p, y - p, uActNr++); |
sActColor, x - p, y + p, x + p, y - p, uActNr++); |
uActNr += 4; |
uActNr += 4; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
Line 687 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
Line 732 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
/*}}} */ |
/*}}} */ |
case 3: |
case 3: |
/* box */ |
/* box */ |
fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 4: |
case 4: |
/* filled box */ |
/* filled box */ |
fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 5: |
case 5: |
/* circle */ |
/* circle */ |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 6: |
case 6: |
/* filled circle */ |
/* filled circle */ |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
sActColor, x - p, y - p, x + p, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 7: |
case 7: |
/* triangle up */ |
/* triangle up */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',4,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',4,[\n\ |
sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, x, y - p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
|
sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, |
|
x, y - p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 8: |
case 8: |
/* filled triangle up */ |
/* filled triangle up */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',4,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',4,[\n\ |
sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, x, y - p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
|
sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p, |
|
x, y - p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 9: |
case 9: |
/* triangle down */ |
/* triangle down */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',4,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',4,[\n\ |
sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, x, y + p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
|
sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, |
|
x, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 10: |
case 10: |
/* filled triangle down */ |
/* filled triangle down */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',4,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',4,[\n\ |
sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, x, y + p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
|
sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p, |
|
x, y + p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 11: |
case 11: |
/* diamond */ |
/* diamond */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',5,[\n\ |
sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n\ |
|
]).\n", |
|
sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, |
|
uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 12: |
case 12: |
/* filled diamond */ |
/* filled diamond */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',5,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',5,[\n\ |
sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr); |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n\ |
|
]).\n", |
|
sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, |
|
uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 13: |
case 13: |
/* pentagon */ |
/* pentagon */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',6,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',6,[\n\ |
sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, x - 0.625 * p, y + p, |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
x - p, y - p / 4, x, y - p, uActNr); |
sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, |
|
x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 14: |
case 14: |
/* filled pentagon */ |
/* filled pentagon */ |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"polygon('%s',6,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
polygon('%s',6,[\n\ |
sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, x - 0.625 * p, y + p, |
%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n", |
x - p, y - p / 4, x, y - p, uActNr); |
sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p, |
|
x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr); |
uActNr++; |
uActNr++; |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 15: |
case 15: |
/* circle1 */ |
/* circle1 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n\ |
|
]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,4480,2560,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,4480,2560,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x + p * 0.342, y - p * 0.94, x - p * 0.342, y - p * |
sActColor, x - p, y - p, x, y, x + p * 0.342, y - p * 0.94, |
0.94, 2 * p, 2 * p, uActNr++); |
x - p * 0.342, y - p * 0.94, 2 * p, 2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 16: |
case 16: |
/* circle2 */ |
/* circle2 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 17: |
case 17: |
/* circle3 */ |
/* circle3 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 18: |
case 18: |
/* circle4 */ |
/* circle4 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,11520,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,11520,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x + p, y, x - p, y, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x + p, y, x - p, y, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 19: |
case 19: |
/* circle5 */ |
/* circle5 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 20: |
case 20: |
/* circle6 */ |
/* circle6 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p, |
fprintf(gpoutfile, |
2 * p, uActNr++); |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, 2 * p, uActNr++); |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,5760,%u,0,0,8,3,0,[\n]).\n", |
|
sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 3; |
uActNr += 3; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 21: |
case 21: |
/* circle7 */ |
/* circle7 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,11520,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,11520,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x, y - p, x, y + p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x, y - p, x, y + p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 22: |
case 22: |
/* circle8 */ |
/* circle8 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,17280,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,0,17280,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x + p, y, x, y + p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x + p, y, x, y + p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 23: |
case 23: |
/* circle9 */ |
/* circle9 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 24: |
case 24: |
/* circle10 */ |
/* circle10 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,11520,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,11520,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x, y + p, x, y - p, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x, y + p, x, y - p, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 2; |
uActNr += 2; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
/*}}} */ |
/*}}} */ |
case 25: |
case 25: |
/* circle11 */ |
/* circle11 */ |
fprintf(gpoutfile, "group([\n"); |
fputs("group([\n", gpoutfile); |
fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
|
oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n", |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
sActColor, x - p, y - p, x + p, y + p, uActNr++); |
fprintf(gpoutfile, |
fprintf(gpoutfile, "\ |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,5760,%u,0,0,8,3,0,[\n]).\n", |
sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, 2 * p, uActNr++); |
sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p, |
fprintf(gpoutfile, |
2 * p, uActNr++); |
"arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", |
fprintf(gpoutfile, "\ |
sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, 2 * p, uActNr++); |
arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,5760,%u,0,0,8,3,0,[\n]).\n", |
|
sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p, |
|
2 * p, uActNr++); |
uActNr += 3; |
uActNr += 3; |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++); |
break; |
break; |
Line 1385 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
Line 1474 poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0 |
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC void TGIF_set_pointsize(size) |
TERM_PUBLIC void |
|
TGIF_set_pointsize(size) |
double size; |
double size; |
{ |
{ |
uActPointSize = size; |
uActPointSize = size; |
|
|
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
TERM_PUBLIC int TGIF_set_font(font) /* Entry font as added by DJL in post.trm */ |
TERM_PUBLIC int |
|
TGIF_set_font(font) /* Entry font as added by DJL in post.trm */ |
char *font; |
char *font; |
{ |
{ |
char name[32]; |
char name[32]; |
int size, sep; |
int size; |
|
size_t sep; |
|
|
sep = strcspn(font, ","); |
sep = strcspn(font, ","); |
strncpy(name, font, sep); |
strncpy(name, font, sep); |
|
|
return TRUE; |
return TRUE; |
} |
} |
|
|
|
#ifdef PM3D |
|
TERM_PUBLIC int TGIF_make_palette(t_sm_palette *palette) |
|
{ |
|
int i; |
|
|
|
/* Query to determine palette size */ |
|
if (palette==NULL) { |
|
return(TGIF_palette_size); /* How big is palette ? */ |
|
} |
|
|
|
TGIF_flush_poly(); /* Clean up current data */ |
|
|
|
if (TGIF_palette_set == FALSE) { |
|
/* Create new palette */ |
|
for (i = 0; i < sm_palette.colors; i++) { |
|
sprintf(TGIF_colours[i],"#%.2x%.2x%.2x", |
|
(int)( palette->color[i].r * 255 + 0.5 ), |
|
(int)( palette->color[i].g * 255 + 0.5 ), |
|
(int)( palette->color[i].b * 255 + 0.5 ) ); |
|
} |
|
TGIF_palette_set = TRUE; |
|
} else { |
|
fprintf(stderr, "Attempt to set palette twice\n"); |
|
} |
|
return(0); |
|
} |
|
|
|
TERM_PUBLIC void TGIF_set_color(double gray) |
|
{ |
|
if (TGIF_palette_set == FALSE) { |
|
fprintf(stderr,"Palette used before set\n"); /* Error condition */ |
|
} |
|
sprintf(sActColor,"%s",TGIF_colours[(int)(gray*TGIF_palette_size)]); |
|
} |
|
|
|
TERM_PUBLIC void TGIF_filled_polygon(int points, gpiPoint *corners) |
|
{ |
|
int i; |
|
|
|
if (TGIF_palette_set == FALSE) { |
|
fprintf(stderr,"Palette used before set\n"); /* Error condition */ |
|
} |
|
|
|
if (eTgifState == INPOLY) |
|
TGIF_flush_poly(); /* Clean up current data */ |
|
|
|
fprintf(gpoutfile, "polygon('%s',%d,[\n",sActColor,points+1); |
|
/* loop through points, do the first one last as well as first */ |
|
fprintf(gpoutfile,"%u,%u",(corners[0].x+uXshift),(uYshift-corners[0].y)); |
|
for (i=1;i<points;i++) { |
|
fprintf(gpoutfile, ",%u,%u",(corners[i].x+uXshift),(uYshift-corners[i].y)); |
|
} |
|
fprintf(gpoutfile,",%u,%u",(corners[0].x+uXshift),(uYshift-corners[0].y)); |
|
fprintf(gpoutfile, "],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",uActNr); |
|
uActNr++; |
|
} |
|
#endif /* PM3D */ |
|
|
/*}}} */ |
/*}}} */ |
/***************************************************************************/ |
/***************************************************************************/ |
|
|
|
|
#ifdef TERM_TABLE |
#ifdef TERM_TABLE |
|
|
TERM_TABLE_START(tgif_driver) |
TERM_TABLE_START(tgif_driver) |
"tgif", |
"tgif", |
"TGIF X11 [mode] [x,y] [dashed] [\042font\042 [fontsize]]", |
"TGIF X11 [mode] [x,y] [dashed] [\042font\042 [fontsize]]", |
TGIF_XMAX, TGIF_YMAX, TGIF_VCHAR, TGIF_HCHAR, |
TGIF_XMAX, TGIF_YMAX, TGIF_VCHAR, TGIF_HCHAR, |
TGIF_VTIC, TGIF_HTIC, TGIF_options, TGIF_init, TGIF_reset, |
TGIF_VTIC, TGIF_HTIC, TGIF_options, TGIF_init, TGIF_reset, |
TGIF_text, null_scale, TGIF_graphics, TGIF_move, TGIF_vector, |
TGIF_text, null_scale, TGIF_graphics, TGIF_move, TGIF_vector, |
TGIF_linetype, TGIF_put_text, TGIF_text_angle, |
TGIF_linetype, TGIF_put_text, TGIF_text_angle, |
TGIF_justify_text, TGIF_point, TGIF_arrow, TGIF_set_font, |
TGIF_justify_text, TGIF_point, TGIF_arrow, TGIF_set_font, |
TGIF_set_pointsize, TERM_CAN_MULTIPLOT |
TGIF_set_pointsize, TERM_CAN_MULTIPLOT, 0, 0, 0, 0 |
|
#ifdef PM3D |
|
#ifdef USE_MOUSE |
|
,0, 0, 0, 0, 0 /* no mouse support for the tgif terminal */ |
|
#endif |
|
, TGIF_make_palette, 0 /*previous_palette*/, TGIF_set_color, TGIF_filled_polygon |
|
#endif /* PM3D */ |
TERM_TABLE_END(tgif_driver) |
TERM_TABLE_END(tgif_driver) |
#undef LAST_TERM |
|
|
|
|
#undef LAST_TERM |
#define LAST_TERM tgif_driver |
#define LAST_TERM tgif_driver |
|
|
#endif /* TERM_TABLE */ |
#endif /* TERM_TABLE */ |