[BACK]Return to tgif.trm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / term

Annotation of OpenXM_contrib/gnuplot/term/tgif.trm, Revision 1.1.1.3

1.1.1.3 ! ohara       1: /*
        !             2:  * $Id: tgif.trm,v 1.10.2.1 2002/01/26 19:05:34 lhecking Exp $
        !             3:  */
1.1       maekawa     4:
1.1.1.3 ! ohara       5: /* GNUPLOT - tgif.trm */
1.1       maekawa     6:
                      7: /*[
                      8:  * Copyright 1990 - 1993, 1998
                      9:  *
                     10:  * Permission to use, copy, and distribute this software and its
                     11:  * documentation for any purpose with or without fee is hereby granted,
                     12:  * provided that the above copyright notice appear in all copies and
                     13:  * that both that copyright notice and this permission notice appear
                     14:  * in supporting documentation.
                     15:  *
                     16:  * Permission to modify the software is granted, but not the right to
                     17:  * distribute the complete modified source code.  Modifications are to
                     18:  * be distributed as patches to the released version.  Permission to
                     19:  * distribute binaries produced by compiling modified sources is granted,
                     20:  * provided you
                     21:  *   1. distribute the corresponding source modifications from the
                     22:  *    released version in the form of a patch file along with the binaries,
                     23:  *   2. add special version identification to distinguish your version
                     24:  *    in addition to the base release version number,
                     25:  *   3. provide your name and address as the primary contact for the
                     26:  *    support of your modified version, and
                     27:  *   4. retain our contact information in regard to use of the base
                     28:  *    software.
                     29:  * Permission to distribute the released version of the source code along
                     30:  * with corresponding source modifications in the form of a patch file is
                     31:  * granted with same provisions 2 through 4 for binary distributions.
                     32:  *
                     33:  * This software is provided "as is" without express or implied warranty
                     34:  * to the extent permitted by applicable law.
                     35: ]*/
                     36:
                     37: /*                                       */
                     38: /* This file is included by ../term.c.                                     */
                     39: /*                                                                         */
                     40: /* This terminal driver supports:                                          */
                     41: /*     TGIF                                                                */
                     42: /*                                                                         */
                     43: /* AUTHORS:                                                                */
                     44: /*  Werner Geppert and Andreas Kuhlewind                                   */
                     45: /*  March, 21st 1995                                                       */
                     46: /*                                                                         */
                     47: /* send your comments or suggestions to werner@mez.ruhr-uni-bochum.de      */
                     48: /*                                                                         */
                     49: /*                                                                         */
                     50: /* MODIFIED May, 11st 1997 by NOVÁK Levente (novakl@tigris.klte.hu):       */
                     51: /*                                                                         */
                     52: /*          - Modified the default linewidth for borders from 3 to 2       */
                     53: /*          - Modified the default size of markers' bounding box           */
                     54: /*            to allow nicer shapes                                        */
                     55: /*          - Slightly modified the markers and added several new ones,    */
                     56: /*            now we have 64 different pointtypes, the same as for the     */
                     57: /*            PostScript terminal                                          */
                     58: /*          - I left the %.1f format for pixel positions, but I think      */
                     59: /*            Tgif does only calculate with integer positions              */
1.1.1.3 ! ohara      60: /*                                                                         */
        !            61: /* Modified  07 July 2000 by Ian MacPhedran                                */
        !            62: /*          - added PM3D support                                           */
1.1       maekawa    63:
                     64: /***************************************************************************/
                     65:
                     66: /*}}}  */
                     67: /***************************************************************************/
                     68: #include "driver.h"
                     69:
                     70: #ifdef TERM_REGISTER
                     71: register_term(tgif)
                     72: #endif
                     73:
                     74: #ifdef TERM_PROTO
                     75: TERM_PUBLIC void TGIF_options __PROTO((void));
                     76: TERM_PUBLIC void TGIF_init __PROTO((void));
                     77: TERM_PUBLIC void TGIF_reset __PROTO((void));
                     78: TERM_PUBLIC void TGIF_text __PROTO((void));
                     79: TERM_PUBLIC void TGIF_graphics __PROTO((void));
                     80: TERM_PUBLIC void TGIF_move __PROTO((unsigned int ux, unsigned int uy));
                     81: TERM_PUBLIC void TGIF_vector __PROTO((unsigned int ux, unsigned int uy));
                     82: TERM_PUBLIC void TGIF_linetype __PROTO((int linetype));
                     83: TERM_PUBLIC void TGIF_put_text __PROTO((unsigned int ux, unsigned int uy, char *str)); /* ref point and text */
                     84: TERM_PUBLIC int TGIF_text_angle __PROTO((int ang));
                     85: TERM_PUBLIC int TGIF_justify_text __PROTO((enum JUSTIFY mode));
                     86: TERM_PUBLIC void TGIF_point __PROTO((unsigned int ux, unsigned int uy, int number));
                     87: TERM_PUBLIC void TGIF_arrow __PROTO((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, TBOOLEAN head));
                     88: TERM_PUBLIC int TGIF_set_font __PROTO((char *font));
                     89: TERM_PUBLIC void TGIF_set_pointsize __PROTO((double size));
1.1.1.3 ! ohara      90: #ifdef PM3D
        !            91: TERM_PUBLIC int TGIF_make_palette (t_sm_palette *);
        !            92: /* TERM_PUBLIC void TGIF_previous_palette (void); */
        !            93: TERM_PUBLIC void TGIF_set_color (double);
        !            94: TERM_PUBLIC void TGIF_filled_polygon (int, gpiPoint *);
        !            95: #endif /* PM3D */
1.1       maekawa    96: /*}}}  */
                     97: /* default length for static strings */
                     98: #define TGIF_STRLEN_MAX 255
                     99:
                    100: /* standard x/y plot size in portrait mode */
                    101: #define TGIF_XMAX 950
                    102: #define TGIF_YMAX 634
                    103:
                    104: /* total available plotting area */
                    105: #define TGIF_XTOT 950
                    106: #define TGIF_YTOT 1400
                    107:
                    108: /* Offset  */
                    109: #define TGIF_XOFF 50
                    110: #define TGIF_YOFF 50
                    111:
                    112: #define TGIF_XSHIFT 1030       /* 80 points skip */
                    113: #define TGIF_YSHIFT 714
                    114:
                    115: #define TGIF_VCHAR 18          /* default is 18 pt       */
                    116: #define TGIF_HCHAR (18*6/10)
                    117:
                    118: #define TGIF_VTIC (TGIF_YMAX/80)
                    119: #define TGIF_HTIC (TGIF_YMAX/80)
                    120:
1.1.1.3 ! ohara     121: #ifdef PM3D
        !           122: static int TGIF_palette_set = FALSE;   /* PM3D Palette Set ? */
        !           123: static int TGIF_palette_size = 128;    /* Number of colours in palette */
        !           124: /* unused (joze) */
        !           125: #if 0
        !           126: static int TGIF_palette_offst = 32;    /* Offset from zero for user colours */
        !           127: #endif
        !           128: static char TGIF_colours[128][8];      /* Colours */
        !           129: #endif /* PM3D */
        !           130:
1.1       maekawa   131:
                    132: #define TGIF_MAXPOLY 100
                    133: /*}}}  */
                    134: #define GOT_TGIF_PROTO
                    135: #endif
                    136:
                    137: #ifndef TERM_PROTO_ONLY
                    138:
                    139: #ifdef TERM_BODY
                    140: /* tgif driver by Werner Geppert, werner@mez.ruhr-uni-bochum.de */
                    141: /***************************************************************************/
                    142: /* Variables:                                                              */
                    143: static unsigned int uLastTgifX, uLastTgifY;    /* last Coordinate         */
                    144:
                    145: static unsigned int uActNr;    /* current elementnumber                   */
                    146: static unsigned int uActPage;  /* current pagenumber                      */
                    147: static unsigned int uActResolution;    /* resolution in percent           */
                    148: static unsigned int uActZoom;  /* zoom factor                             */
                    149: static unsigned int uActAngle; /* current textangle                       */
                    150: static unsigned int uActThick; /* actual linethickness                    */
                    151: static unsigned int uActPointSize;     /* point size                      */
                    152: static unsigned int uActStyle; /* actual linestyle                        */
                    153: static unsigned int uActJust;  /* actual textjustification                */
                    154: static unsigned int uXshift;   /* actual shift x                          */
                    155: static unsigned int uYshift;   /* actual shift y                          */
                    156: static unsigned int uTgifPlotCount;    /* counts number of plots          */
                    157: static unsigned int uTgifPlotRow, uTgifPlotCol;                /* actual plot row and col   */
                    158: static unsigned int uTgif_win_horiz, /* number of plots in x and  */ uTgif_win_verti;  /*      y direction [x,y]         */
                    159:
                    160:
                    161:
                    162: static char sActColor[TGIF_STRLEN_MAX];                /* current color         */
                    163: static unsigned int uDefaultFontSize;  /* default font size         */
                    164: static unsigned int uActFontSize;      /* current font size         */
                    165: static char sDefaultFont[TGIF_STRLEN_MAX];     /* default font          */
                    166: static char sActFont[TGIF_STRLEN_MAX]; /* current font          */
                    167: /* static char          sActPointString[TGIF_STRLEN_MAX]; HBB: unused */
                    168:
                    169: static TBOOLEAN TgifSolid = FALSE;
                    170: static TBOOLEAN TgifPortrait = TRUE;
                    171:
                    172: static unsigned int uTgifPlotsPerPage = 1;
                    173: static unsigned int uTextAngle[] =
                    174: {0, 3};
                    175:
                    176: /*
                    177:  * 10 different pointtypes need 10 different linetypes
                    178:  */
                    179:
                    180: /* NL: Modified first value to 2 from 3 */
                    181: static unsigned int uLineThick[] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
                    182: static unsigned int uLineStyle[] = { 0, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 };
1.1.1.3 ! ohara     183: static char *psColors[] = {
        !           184:     "black", "black",          /* border and x/y-zero-axes       */
        !           185:     "red", "green", "blue", "magenta", "cyan", "yellow",
        !           186:     "DarkSeaGreen", "HotPink", "black", "coral"
        !           187: };
1.1       maekawa   188:
                    189: #if 0                          /* HBB: unused */
1.1.1.3 ! ohara     190: static char *psFonts[] = {
        !           191:     "Times-Roman", "Courier", "Helvetica", "NewCenturySchlbk-Roman",
        !           192:     "Symbol", NULL
        !           193: };
1.1       maekawa   194:
1.1.1.3 ! ohara     195: static unsigned int psFontSizes[] = {
        !           196:     8, 10, 11, 12, 14, 17, 18, 20, 24, 25, 34, 40, 45, 50
        !           197: };
1.1       maekawa   198: #endif
                    199:
                    200: static int iTgifPolyCount;
                    201: static unsigned int uBuffX[TGIF_MAXPOLY], uBuffY[TGIF_MAXPOLY];
                    202:
                    203: enum eState {
                    204:     NEWPOLY = 100, INPOLY
                    205: };
                    206: static enum eState eTgifState = NEWPOLY;
                    207:
                    208: static void TGIF_flush_poly __PROTO((void));
                    209:
                    210:
                    211:
                    212: /*}}}  */
                    213: /***************************************************************************/
1.1.1.3 ! ohara     214: static void
        !           215: TGIF_flush_poly()
1.1       maekawa   216: {
                    217:     int i;
                    218:
                    219:
                    220:     if (eTgifState == INPOLY) {
                    221:        fprintf(gpoutfile, "poly('%s',%d,[\n\t", sActColor, iTgifPolyCount);
                    222:
                    223:        for (i = 0; i < iTgifPolyCount - 1; i++) {
                    224:            fprintf(gpoutfile, "%u,%u,", uBuffX[i], uBuffY[i]);
                    225:            if ((i + 1) % 8 == 0)
                    226:                fputs("\n\t", gpoutfile);
                    227:        }
                    228:
                    229:        fprintf(gpoutfile, "%u,%u],0,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n",
                    230:                uBuffX[iTgifPolyCount - 1], uBuffY[iTgifPolyCount - 1],
                    231:                uActThick, uActNr, uActStyle);
                    232:
                    233:        uActNr++;
                    234:
                    235:        eTgifState = NEWPOLY;
                    236:        iTgifPolyCount = 0;
                    237:        if (gpoutfile != (FILE *) NULL)
                    238:            fflush(gpoutfile);
                    239:     }
                    240: }                              /* TGIF_flush_poly */
                    241: /*}}}  */
                    242: /***************************************************************************/
1.1.1.3 ! ohara     243: TERM_PUBLIC void
        !           244: TGIF_options()
1.1       maekawa   245: {
                    246:
                    247:     struct value a, b;
                    248:     double dscaleH, dscaleV;
                    249:
                    250:
                    251:     strcpy(sActFont, "Helvetica");
                    252:     strcpy(sDefaultFont, "Helvetica");
                    253:     uActFontSize = 18;
                    254:     uDefaultFontSize = 18;
                    255:     term->v_char = (unsigned int) (uActFontSize);
                    256:     term->h_char = (unsigned int) (uActFontSize * 6 / 10);
                    257:
                    258:     TgifPortrait = TRUE;
                    259:     uTgifPlotsPerPage = 1;
                    260:     uTgifPlotRow = 1;
                    261:     uTgifPlotCol = 1;
                    262:     uTgif_win_horiz = 1;
                    263:     uTgif_win_verti = 1;
                    264:     uActResolution = 100;
                    265:
                    266:
                    267: /*}}}  */
                    268:
                    269:     if (!END_OF_COMMAND) {
                    270:        if (almost_equals(c_token, "p$ortrait")) {
                    271:            TgifPortrait = TRUE;
                    272:            c_token++;
                    273:        } else if (almost_equals(c_token, "l$andscape")) {
                    274:            TgifPortrait = FALSE;
                    275:            uActResolution = 140;
                    276:            c_token++;
                    277:        }
                    278:     }
                    279: /*}}}  */
                    280:
                    281:     if (!END_OF_COMMAND) {
                    282:        if (equals(c_token, "[")) {     /* windows specified */
                    283:            c_token++;
                    284:            if (END_OF_COMMAND) {
                    285:                int_error("no. windows: [horizontal,vertical] expected", c_token);
                    286:            } else if (!equals(c_token, ",")) {
                    287:                uTgif_win_horiz = (int) real(const_express(&a));
                    288:            }
                    289:            if (!equals(c_token, ","))
                    290:                int_error("',' expected", c_token);
                    291:            c_token++;
                    292:            if (!equals(c_token, "]")) {
                    293:                uTgif_win_verti = (int) real(const_express(&a));
                    294:            }
                    295:            if (!equals(c_token, "]"))
                    296:                int_error("expecting ']'", c_token);
                    297:            c_token++;
                    298:
                    299:            uTgifPlotsPerPage = uTgif_win_verti * uTgif_win_horiz;
                    300:
                    301:
                    302:        }
                    303:     }
                    304: /*}}}  */
                    305:
                    306:     if (!END_OF_COMMAND) {
                    307:        if (almost_equals(c_token, "s$olid")) {
                    308:            TgifSolid = TRUE;
                    309:            c_token++;
                    310:        } else if (almost_equals(c_token, "d$ashed")) {
                    311:            TgifSolid = FALSE;
                    312:            c_token++;
                    313:        }
                    314:     }
                    315: /*}}}  */
                    316:
                    317:     if (!END_OF_COMMAND && isstring(c_token)) {
                    318:        quote_str(sActFont, c_token, MAX_LINE_LEN);
                    319:        strcpy(sDefaultFont, sActFont);
                    320:        c_token++;
                    321:     }
                    322:     if (!END_OF_COMMAND) {
                    323:        /* We have font size specified */
                    324:        uActFontSize = (unsigned int) real(const_express(&b));
                    325:        uDefaultFontSize = uActFontSize;
                    326:        term->v_char = (unsigned int) (uActFontSize);
                    327:        term->h_char = (unsigned int) (uActFontSize * 6 / 10);
                    328:     }
                    329: /*}}}  */
                    330:
                    331:     if (TgifPortrait) {
                    332:        dscaleH = (double) 100.0 *(TGIF_XTOT) / (xsize * (TGIF_XMAX + (uTgif_win_horiz - 1) * TGIF_XSHIFT));
                    333:        dscaleV = (double) 100.0 *(TGIF_YTOT) / (ysize * (TGIF_YMAX + (uTgif_win_verti - 1) * TGIF_YSHIFT));
                    334:        uActResolution = (int) GPMIN(dscaleH, dscaleV);
                    335:        switch (uTgif_win_verti) {
                    336:        case 1:
                    337:            uActZoom = 0;
                    338:            break;
                    339:
                    340:        case 2:
                    341:            uActZoom = 1;
                    342:            break;
                    343:        default:
                    344:            uActZoom = 2;
                    345:            break;
                    346:
                    347:        }
                    348:     } else {
                    349:        dscaleH = (double) 100.0 *(TGIF_YTOT) / (xsize * (TGIF_XMAX + (uTgif_win_horiz - 1) * TGIF_XSHIFT));
                    350:        dscaleV = (double) 100.0 *(TGIF_XTOT) / (ysize * (TGIF_YMAX + (uTgif_win_verti - 1) * TGIF_YSHIFT));
                    351:        uActResolution = (unsigned int) GPMIN(dscaleH, dscaleV);
                    352:
                    353:        switch (uTgif_win_verti) {
                    354:        case 1:
                    355:            uActZoom = 0;
                    356:            break;
                    357:
                    358:        case 2:
                    359:            uActZoom = 1;
                    360:            break;
                    361:        default:
                    362:            uActZoom = 2;
                    363:            break;
                    364:
                    365:        }
                    366:     }
                    367:
                    368: /*}}}  */
                    369:
                    370:     sprintf(term_options, "%s [%u,%u] %s \"%s\" %u",
                    371:            TgifPortrait ? "portrait" : "landscape",
                    372:            uTgif_win_horiz, uTgif_win_verti,
                    373:            TgifSolid ? "solid" : "dashed",
                    374:            sActFont, uActFontSize);
                    375: }
                    376: /*}}}  */
                    377: /***************************************************************************/
1.1.1.3 ! ohara     378: TERM_PUBLIC void
        !           379: TGIF_init()
1.1       maekawa   380: {
                    381:
                    382:     if (multiplot) {
                    383:        /* uActResolution= TgifPortrait ? (unsigned int)100 : (unsigned int)145 ; */
                    384:        uActResolution = (unsigned int) 100;
                    385:
                    386:        if (uTgifPlotsPerPage > 1) {
                    387:            fputs("warning: using standard multiplot\n", stderr);
                    388:            uTgifPlotsPerPage = 1;
                    389:        }
                    390:        uActZoom = 1;
                    391:     }
                    392:     fprintf(gpoutfile, "\
                    393: %%TGIF 2.15-p7\n\
                    394: state(%d,30,%u,0,0,%u,16,1,9,1,1,0,0,0,0,1,0,'%s',0,%u,0,0,1,10,0,0,1,1,0,16,0,0,1,1,1).\n\
1.1.1.3 ! ohara     395: %%\n%% @(#)$Header: /cvsroot/gnuplot/gnuplot/term/tgif.trm,v 1.10.2.1 2002/01/26 19:05:34 lhecking Exp $\n%% %%W%%\n%%\n\
1.1       maekawa   396: page(1,\"\").\n",
                    397:            TgifPortrait ? 0 : 1, uActResolution, uActZoom, sActFont, uActFontSize);
                    398:     eTgifState = NEWPOLY;
                    399:     iTgifPolyCount = 0;
                    400:     uTgifPlotCount = 0;
                    401:     uActPage = 1;
1.1.1.3 ! ohara     402: #ifdef PM3D
        !           403:     TGIF_palette_set = FALSE;    /* PM3D Palette Set ? */
        !           404: #endif /* PM3D */
1.1       maekawa   405:
                    406: }                              /* TGIF_init */
                    407: /*}}}  */
                    408: /***************************************************************************/
1.1.1.3 ! ohara     409: TERM_PUBLIC void
        !           410: TGIF_graphics()
1.1       maekawa   411: {
                    412:
                    413:     TGIF_flush_poly();
                    414:
                    415:     if (multiplot) {
                    416:
                    417:        term->xmax = (TgifPortrait) ? TGIF_XTOT : TGIF_YTOT;
                    418:        term->ymax = (TgifPortrait) ? TGIF_YTOT : TGIF_XTOT;
                    419:        uLastTgifX = (TgifPortrait) ? TGIF_XOFF : TGIF_YOFF;
                    420:        uLastTgifY = (TgifPortrait) ? TGIF_YTOT + TGIF_YOFF : TGIF_XTOT + TGIF_XOFF;
                    421:
                    422:        uYshift = uLastTgifY;
                    423:        uXshift = uLastTgifX;
                    424:
                    425:     } else {
                    426:        if (uTgifPlotCount < uTgifPlotsPerPage)
                    427:            uTgifPlotCount++;
                    428:        else {
1.1.1.3 ! ohara     429:            fputs("error: number of plots > plots per page\n", stderr);
1.1       maekawa   430:            return;
                    431:        }
                    432:
                    433:        uXshift = (unsigned int) TGIF_XOFF *100 / uActResolution + (xsize * (uTgifPlotCol - 1) * TGIF_XSHIFT);
                    434:        uYshift = (unsigned int) TGIF_YOFF *100 / uActResolution + (ysize * (TGIF_YMAX +
                    435:                                                                             (uTgifPlotRow - 1) * TGIF_YSHIFT));
                    436:
                    437:        if (uTgifPlotCount % uTgif_win_horiz == 0) {
                    438:            uTgifPlotCol = 1;
                    439:            uTgifPlotRow++;
                    440:        } else {
                    441:            uTgifPlotCol++;
                    442:        }
                    443:
                    444:        uLastTgifX = uXshift;
                    445:        uLastTgifY = uYshift;
                    446:
                    447:     }
                    448:
                    449:
                    450:
                    451:
                    452:
                    453: /* default settings for each plot */
                    454:     iTgifPolyCount = 0;
                    455:     uActNr = 0;
                    456:     uActAngle = 0;
                    457:     uActThick = 1;
                    458:     uActStyle = 0;
                    459:     uActJust = LEFT;
                    460:     strcpy(sActColor, psColors[0]);
                    461:
                    462:
                    463: }                              /* TGIF_graphics */
                    464: /*}}}  */
                    465: /***************************************************************************/
1.1.1.3 ! ohara     466: TERM_PUBLIC void
        !           467: TGIF_text()
1.1       maekawa   468: {
                    469:     TGIF_flush_poly();
                    470:
                    471:
                    472: }                              /* TGIF_text */
                    473:
                    474: /*}}}  */
                    475: /***************************************************************************/
1.1.1.3 ! ohara     476: TERM_PUBLIC void
        !           477: TGIF_reset()
1.1       maekawa   478: {
                    479:     TGIF_flush_poly();
                    480:     iTgifPolyCount = 0;
                    481:     uTgifPlotCount = 0;
                    482:     uTgifPlotRow = 1;
                    483:     uTgifPlotCol = 1;
                    484:
                    485:
                    486:     if (gpoutfile != (FILE *) NULL)
                    487:        fflush(gpoutfile);
                    488:
                    489: }                              /* TGIF_reset */
                    490: /*}}}  */
                    491: /***************************************************************************/
1.1.1.3 ! ohara     492: TERM_PUBLIC void
        !           493: TGIF_linetype(linetype)
1.1       maekawa   494: int linetype;
                    495: {
                    496:     unsigned int ult;
                    497:
                    498:
                    499:     TGIF_flush_poly();
                    500:
                    501:
                    502:     if (linetype >= 0)
                    503:        ult = 2 + linetype % 10;
                    504:     else
                    505:        ult = linetype + 2;
                    506:
                    507:     strcpy(sActColor, psColors[ult]);
                    508:     uActThick = uLineThick[ult];
                    509:     if (!TgifSolid)
                    510:        uActStyle = uLineStyle[ult];
                    511:     else {
                    512:        if (ult == 1)           /* grid */
                    513:            uActStyle = uLineStyle[ult];
                    514:        else
                    515:            uActStyle = uLineStyle[2];
                    516:
                    517:     }
                    518:
                    519: }                              /* TGIF_linetype */
                    520: /*}}}  */
                    521: /***************************************************************************/
1.1.1.3 ! ohara     522: TERM_PUBLIC void
        !           523: TGIF_move(ux, uy)
1.1       maekawa   524: unsigned int ux, uy;
                    525: {
                    526:
                    527:     uLastTgifX = ux + uXshift;
                    528:     uLastTgifY = uYshift - uy;
                    529:
                    530:     if (eTgifState == INPOLY)
                    531:        TGIF_flush_poly();
                    532:
                    533:
                    534:
                    535: }                              /* TGIF_move */
                    536: /*}}}  */
                    537: /***************************************************************************/
1.1.1.3 ! ohara     538: TERM_PUBLIC void
        !           539: TGIF_vector(ux, uy)
1.1       maekawa   540: unsigned int ux, uy;
                    541: {
                    542:
                    543:     ux = ux + uXshift;
                    544:     uy = uYshift - uy;
                    545:
                    546:
                    547:
                    548:     if (eTgifState == NEWPOLY) {
                    549:        uBuffX[0] = uLastTgifX;
                    550:        uBuffY[0] = uLastTgifY;
                    551:        iTgifPolyCount = 1;
                    552:        eTgifState = INPOLY;
                    553:     }
                    554:     uBuffX[iTgifPolyCount] = ux;
                    555:     uBuffY[iTgifPolyCount] = uy;
                    556:     uLastTgifX = ux;
                    557:     uLastTgifY = uy;
                    558:     iTgifPolyCount++;
                    559:     eTgifState = INPOLY;
                    560:
                    561:     if (iTgifPolyCount == TGIF_MAXPOLY) {
                    562:        TGIF_flush_poly();
                    563:
                    564:     }
                    565: }                              /* TGIF_vector */
                    566: /*}}}  */
                    567: /***************************************************************************/
1.1.1.3 ! ohara     568: TERM_PUBLIC void
        !           569: TGIF_arrow(sx, sy, ex, ey, head)
1.1       maekawa   570: unsigned int sx, sy, ex, ey;
                    571: TBOOLEAN head;
                    572: {
                    573:
                    574:     TGIF_flush_poly();
                    575:
                    576:     sx = sx + uXshift;
                    577:     ex = ex + uXshift;
                    578:     sy = uYshift - sy;
                    579:     ey = uYshift - ey;
                    580:
                    581:
                    582:     if (head) {
1.1.1.3 ! ohara     583:        fprintf(gpoutfile, "\
        !           584: poly('%s',%d,[\n\
        !           585: \t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n",
1.1       maekawa   586:                sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle);
                    587:     } else {
1.1.1.3 ! ohara     588:        fprintf(gpoutfile, "\
        !           589: poly('%s',%d,[\n\
        !           590: \t%u,%u,%u,%u],1,%u,1,%u,0,0,%u,0,8,3,0,[\n]).\n",
1.1       maekawa   591:                sActColor, 2, sx, sy, ex, ey, uActThick, uActNr, uActStyle);
                    592:     }
                    593:
                    594:     uActNr++;
                    595:
                    596:
                    597:
                    598:     uLastTgifX = ex;
                    599:     uLastTgifY = ey;
                    600:
                    601: }                              /* TGIF_arrow */
                    602: /*}}}  */
                    603: /***************************************************************************/
1.1.1.3 ! ohara     604: TERM_PUBLIC void
        !           605: TGIF_put_text(ux, uy, str)
1.1       maekawa   606: unsigned int ux, uy;
                    607: char *str;
                    608: {
                    609:
                    610:     unsigned int x, y;
                    611:     struct termentry *t = term;
                    612:
                    613:     TGIF_flush_poly();
                    614:
                    615:     x = ux + uXshift;
                    616:     y = uYshift - uy - t->v_char / 2;
                    617:
                    618:
                    619:
                    620:     if (strlen(str) == 0)
                    621:        return;
                    622:
                    623:
1.1.1.3 ! ohara     624:     fprintf(gpoutfile, "\
        !           625: 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",
        !           626:            sActColor, x, y, sActFont, uActFontSize, uActJust, uActAngle,
        !           627:            uActNr, str);
1.1       maekawa   628:
                    629:     uActNr += 2;
                    630:
                    631:     /* reset font size and font, they might have been changed */
                    632:     uActFontSize = uDefaultFontSize;
                    633:     strcpy(sActFont, sDefaultFont);
                    634:
                    635: }                              /* TGIF_put_text */
                    636: /*}}}  */
                    637: /***************************************************************************/
1.1.1.3 ! ohara     638: TERM_PUBLIC int
        !           639: TGIF_text_angle(ang)
1.1       maekawa   640: int ang;
                    641: {
                    642:     uActAngle = uTextAngle[ang];       /* 0=waag.  1=senkrecht */
                    643:     return (TRUE);
                    644: }                              /* TGIF_text_angle */
                    645:
                    646: /*}}}  */
                    647: /***************************************************************************/
1.1.1.3 ! ohara     648: TERM_PUBLIC int
        !           649: TGIF_justify_text(mode)
1.1       maekawa   650: enum JUSTIFY mode;
                    651: {
                    652:     uActJust = mode;
                    653:     return (TRUE);
                    654: }                              /* TGIF_justify_text */
                    655:
                    656: /*}}}  */
                    657: /***************************************************************************/
1.1.1.3 ! ohara     658: TERM_PUBLIC void
        !           659: TGIF_point(ux, uy, number)
1.1       maekawa   660: unsigned int ux, uy;
                    661: int number;
                    662: {
1.1.1.3 ! ohara     663:     double p;          /* all pointtypes fit in a (x +/-p)x(y +/-p) box */
1.1       maekawa   664:
                    665:     double x, y;
                    666:
                    667:
                    668:
                    669:     x = (double) (ux + uXshift);
                    670:     y = (double) (uYshift - uy);
                    671:
                    672:     p = pointsize * 8.0;       /* NL: Increased the bounding box (p value) from 4.0 to 8.0 */
                    673:     if (p == (double) 0.0)
                    674:        p = 0.1;
                    675:
                    676:     TGIF_flush_poly();
                    677:
                    678:     if (number != -1)
                    679:        number = number % 63;
                    680:     switch (number) {
                    681:     case -1:
1.1.1.3 ! ohara     682:        /* HBB: corrected format string, shuts up gcc -Wall */
        !           683:        fprintf(gpoutfile, "\
        !           684: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,1,1,%u,0,0,0,0,8,3,0,[\n]).\n",
1.1       maekawa   685:                sActColor, x, y, x + 1, y + 1, uActNr++);
                    686:        break;
                    687:     case 0:
                    688:        /* cross */
                    689:        /* taking thickness 2 for cross & plus & star */
                    690:        fprintf(gpoutfile, "\
                    691: group([\n\
                    692: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n\
                    693: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n",
                    694:                sActColor, x - p, y - p, x + p, y + p, uActNr+1,
                    695:                sActColor, x - p, y + p, x + p, y - p, uActNr+2);
                    696:        uActNr += 4;
                    697:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    698:        break;
                    699:        /*}}}  */
                    700:     case 1:
                    701:        /* plus */
                    702:        /* taking thickness 2 for cross & plus & star */
                    703:        fprintf(gpoutfile, "\
                    704: group([\n\
                    705: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n\
                    706: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n",
                    707:                sActColor, x, y - p - 1, x, y + p + 1, uActNr+1,
                    708:                sActColor, x - p - 1, y, x + p + 1, y, uActNr+2);
                    709:        uActNr += 4;
                    710:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    711:        break;
                    712:        /*}}}  */
                    713:     case 2:
                    714:        /* star */
                    715:        /* taking thickness 2 for cross & plus & star */
1.1.1.3 ! ohara     716:        fputs("group([\n", gpoutfile);
        !           717:        fprintf(gpoutfile, "\
        !           718: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]),\n",
1.1       maekawa   719:                sActColor, x, y - p - 1, x, y + p + 1, uActNr++);
1.1.1.3 ! ohara     720:        fprintf(gpoutfile, "\
        !           721: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n])\n",
1.1       maekawa   722:                sActColor, x - p - 1, y, x + p + 1, y, uActNr++);
1.1.1.3 ! ohara     723:        fprintf(gpoutfile, "\
        !           724: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n",
1.1       maekawa   725:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     726:        fprintf(gpoutfile, "\
        !           727: poly('%s',2,[\n\t%.1f,%.1f,%.1f,%.1f],0,2,1,%u,0,0,0,0,8,3,0,[\n]).\n",
1.1       maekawa   728:                sActColor, x - p, y + p, x + p, y - p, uActNr++);
                    729:        uActNr += 4;
                    730:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    731:        break;
                    732:        /*}}}  */
                    733:     case 3:
                    734:        /* box */
1.1.1.3 ! ohara     735:        fprintf(gpoutfile, "\
        !           736: box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   737:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                    738:        uActNr++;
                    739:        break;
                    740:        /*}}}  */
                    741:     case 4:
                    742:        /* filled box */
1.1.1.3 ! ohara     743:        fprintf(gpoutfile, "\
        !           744: box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   745:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                    746:        uActNr++;
                    747:        break;
                    748:        /*}}}  */
                    749:     case 5:
                    750:        /* circle */
1.1.1.3 ! ohara     751:        fprintf(gpoutfile, "\
        !           752: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   753:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                    754:        uActNr++;
                    755:        break;
                    756:        /*}}}  */
                    757:     case 6:
                    758:        /* filled circle */
1.1.1.3 ! ohara     759:        fprintf(gpoutfile, "\
        !           760: oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   761:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                    762:        uActNr++;
                    763:        break;
                    764:        /*}}}  */
                    765:     case 7:
                    766:        /* triangle up */
1.1.1.3 ! ohara     767:        fprintf(gpoutfile, "\
        !           768: polygon('%s',4,[\n\
        !           769: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           770:                sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p,
        !           771:                x, y - p, uActNr);
1.1       maekawa   772:        uActNr++;
                    773:        break;
                    774:        /*}}}  */
                    775:     case 8:
                    776:        /* filled triangle up */
1.1.1.3 ! ohara     777:        fprintf(gpoutfile, "\
        !           778: polygon('%s',4,[\n\
        !           779: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           780:                sActColor, x, y - p, x + p, y + 0.75 * p, x - p, y + 0.75 * p,
        !           781:                x, y - p, uActNr);
1.1       maekawa   782:        uActNr++;
                    783:        break;
                    784:        /*}}}  */
                    785:     case 9:
                    786:        /* triangle down */
1.1.1.3 ! ohara     787:        fprintf(gpoutfile, "\
        !           788: polygon('%s',4,[\n\
        !           789: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           790:                sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p,
        !           791:                x, y + p, uActNr);
1.1       maekawa   792:        uActNr++;
                    793:        break;
                    794:        /*}}}  */
                    795:     case 10:
                    796:        /* filled triangle down */
1.1.1.3 ! ohara     797:        fprintf(gpoutfile, "\
        !           798: polygon('%s',4,[\n\
        !           799: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           800:                sActColor, x, y + p, x - p, y - 0.75 * p, x + p, y - 0.75 * p,
        !           801:                x, y + p, uActNr);
1.1       maekawa   802:        uActNr++;
                    803:        break;
                    804:        /*}}}  */
                    805:     case 11:
                    806:        /* diamond */
1.1.1.3 ! ohara     807:        fprintf(gpoutfile, "\
        !           808: polygon('%s',5,[\n\
        !           809: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n\
        !           810: ]).\n",
        !           811:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p,
        !           812:                uActNr);
1.1       maekawa   813:        uActNr++;
                    814:        break;
                    815:        /*}}}  */
                    816:     case 12:
                    817:        /* filled diamond */
1.1.1.3 ! ohara     818:        fprintf(gpoutfile, "\
        !           819: polygon('%s',5,[\n\
        !           820: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n\
        !           821: ]).\n",
        !           822:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p,
        !           823:                uActNr);
1.1       maekawa   824:        uActNr++;
                    825:        break;
                    826:        /*}}}  */
                    827:     case 13:
                    828:        /* pentagon */
1.1.1.3 ! ohara     829:        fprintf(gpoutfile, "\
        !           830: polygon('%s',6,[\n\
        !           831: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],0,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           832:                sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p,
        !           833:                x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr);
1.1       maekawa   834:        uActNr++;
                    835:        break;
                    836:        /*}}}  */
                    837:     case 14:
                    838:        /* filled pentagon */
1.1.1.3 ! ohara     839:        fprintf(gpoutfile, "\
        !           840: polygon('%s',6,[\n\
        !           841: %.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
        !           842:                sActColor, x, y - p, x + p, y - p / 4, x + 0.625 * p, y + p,
        !           843:                x - 0.625 * p, y + p, x - p, y - p / 4, x, y - p, uActNr);
1.1       maekawa   844:        uActNr++;
                    845:        break;
                    846:        /*}}}  */
                    847:     case 15:
                    848:        /* circle1 */
1.1.1.3 ! ohara     849:        fputs("group([\n", gpoutfile);
        !           850:        fprintf(gpoutfile, "\
        !           851: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n\
        !           852: ]).\n",
1.1       maekawa   853:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     854:        fprintf(gpoutfile, "\
        !           855: 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",
        !           856:                sActColor, x - p, y - p, x, y, x + p * 0.342, y - p * 0.94,
        !           857:                x - p * 0.342, y - p * 0.94, 2 * p, 2 * p, uActNr++);
1.1       maekawa   858:        uActNr += 2;
                    859:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    860:        break;
                    861:        /*}}}  */
                    862:     case 16:
                    863:        /* circle2 */
1.1.1.3 ! ohara     864:        fputs("group([\n", gpoutfile);
        !           865:        fprintf(gpoutfile, "\
        !           866: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   867:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     868:        fprintf(gpoutfile, "\
        !           869: 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",
        !           870:                sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p,
        !           871:                2 * p, uActNr++);
1.1       maekawa   872:        uActNr += 2;
                    873:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    874:        break;
                    875:        /*}}}  */
                    876:     case 17:
                    877:        /* circle3 */
1.1.1.3 ! ohara     878:        fputs("group([\n", gpoutfile);
        !           879:        fprintf(gpoutfile, "\
        !           880: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   881:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     882:        fprintf(gpoutfile, "\
        !           883: 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",
        !           884:                sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p,
        !           885:                2 * p, uActNr++);
1.1       maekawa   886:        uActNr += 2;
                    887:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    888:        break;
                    889:        /*}}}  */
                    890:     case 18:
                    891:        /* circle4 */
1.1.1.3 ! ohara     892:        fputs("group([\n", gpoutfile);
        !           893:        fprintf(gpoutfile, "\
        !           894: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   895:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     896:        fprintf(gpoutfile, "\
        !           897: 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",
        !           898:                sActColor, x - p, y - p, x, y, x + p, y, x - p, y, 2 * p,
        !           899:                2 * p, uActNr++);
1.1       maekawa   900:        uActNr += 2;
                    901:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    902:        break;
                    903:        /*}}}  */
                    904:     case 19:
                    905:        /* circle5 */
1.1.1.3 ! ohara     906:        fputs("group([\n", gpoutfile);
        !           907:        fprintf(gpoutfile, "\
        !           908: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   909:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     910:        fprintf(gpoutfile, "\
        !           911: 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",
        !           912:                sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p,
        !           913:                2 * p, uActNr++);
1.1       maekawa   914:        uActNr += 2;
                    915:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    916:        break;
                    917:        /*}}}  */
                    918:     case 20:
                    919:        /* circle6 */
1.1.1.3 ! ohara     920:        fputs("group([\n", gpoutfile);
        !           921:        fprintf(gpoutfile, "\
        !           922: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   923:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     924:        fprintf(gpoutfile, "\
        !           925: 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",
        !           926:                sActColor, x - p, y - p, x, y, x + p, y, x, y - p, 2 * p,
        !           927:                2 * p, uActNr++);
        !           928:        fprintf(gpoutfile, "\
        !           929: 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",
        !           930:                sActColor, x - p, y - p, x, y, x - p, y, x, y + p, 2 * p,
        !           931:                2 * p, uActNr++);
1.1       maekawa   932:        uActNr += 3;
                    933:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    934:        break;
                    935:        /*}}}  */
                    936:     case 21:
                    937:        /* circle7 */
1.1.1.3 ! ohara     938:        fputs("group([\n", gpoutfile);
        !           939:        fprintf(gpoutfile, "\
        !           940: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   941:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     942:        fprintf(gpoutfile, "\
        !           943: 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",
        !           944:                sActColor, x - p, y - p, x, y, x, y - p, x, y + p, 2 * p,
        !           945:                2 * p, uActNr++);
1.1       maekawa   946:        uActNr += 2;
                    947:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    948:        break;
                    949:        /*}}}  */
                    950:     case 22:
                    951:        /* circle8 */
1.1.1.3 ! ohara     952:        fputs("group([\n", gpoutfile);
        !           953:        fprintf(gpoutfile, "\
        !           954: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   955:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     956:        fprintf(gpoutfile, "\
        !           957: 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",
        !           958:                sActColor, x - p, y - p, x, y, x + p, y, x, y + p, 2 * p,
        !           959:                2 * p, uActNr++);
1.1       maekawa   960:        uActNr += 2;
                    961:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    962:        break;
                    963:        /*}}}  */
                    964:     case 23:
                    965:        /* circle9 */
1.1.1.3 ! ohara     966:        fputs("group([\n", gpoutfile);
        !           967:        fprintf(gpoutfile, "\
        !           968: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   969:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     970:        fprintf(gpoutfile, "\
        !           971: 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",
        !           972:                sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p,
        !           973:                2 * p, uActNr++);
1.1       maekawa   974:        uActNr += 2;
                    975:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    976:        break;
                    977:        /*}}}  */
                    978:     case 24:
                    979:        /* circle10 */
1.1.1.3 ! ohara     980:        fputs("group([\n", gpoutfile);
        !           981:        fprintf(gpoutfile, "\
        !           982: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   983:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     984:        fprintf(gpoutfile, "\
        !           985: 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",
        !           986:                sActColor, x - p, y - p, x, y, x, y + p, x, y - p, 2 * p,
        !           987:                2 * p, uActNr++);
1.1       maekawa   988:        uActNr += 2;
                    989:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                    990:        break;
                    991:        /*}}}  */
                    992:     case 25:
                    993:        /* circle11 */
1.1.1.3 ! ohara     994:        fputs("group([\n", gpoutfile);
        !           995:        fprintf(gpoutfile, "\
        !           996: oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
1.1       maekawa   997:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
1.1.1.3 ! ohara     998:        fprintf(gpoutfile, "\
        !           999: 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",
        !          1000:                sActColor, x - p, y - p, x, y, x, y - p, x - p, y, 2 * p,
        !          1001:                2 * p, uActNr++);
        !          1002:        fprintf(gpoutfile, "\
        !          1003: 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",
        !          1004:                sActColor, x - p, y - p, x, y, x, y + p, x + p, y, 2 * p,
        !          1005:                2 * p, uActNr++);
1.1       maekawa  1006:        uActNr += 3;
                   1007:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1008:        break;
                   1009:        /*}}}  */
                   1010:     case 26:
                   1011:        /* circle12 */
                   1012:        fprintf(gpoutfile, "group([\n");
                   1013:        fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1014:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1015:        fprintf(gpoutfile,
                   1016:                "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,17280,17280,%u,0,0,8,3,0,[\n]).\n",
                   1017:                sActColor, x - p, y - p, x, y, x, y + p, x - p, y, 2 * p, 2 * p, uActNr++);
                   1018:        uActNr += 2;
                   1019:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1020:        break;
                   1021:        /*}}}  */
                   1022:     case 27:
                   1023:        /* circle13 */
                   1024:        fprintf(gpoutfile, "group([\n");
                   1025:        fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1026:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1027:        fprintf(gpoutfile,
                   1028:                "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,11520,%u,0,0,8,3,0,[\n]).\n",
                   1029:                sActColor, x - p, y - p, x, y, x - p, y, x + p, y, 2 * p, 2 * p, uActNr++);
                   1030:        uActNr += 2;
                   1031:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1032:        break;
                   1033:        /*}}}  */
                   1034:     case 28:
                   1035:        /* circle14 */
                   1036:        fprintf(gpoutfile, "group([\n");
                   1037:        fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1038:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1039:        fprintf(gpoutfile,
                   1040:                "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,11520,17280,%u,0,0,8,3,0,[\n]).\n",
                   1041:                sActColor, x - p, y - p, x, y, x - p, y, x, y - p, 2 * p, 2 * p, uActNr++);
                   1042:        uActNr += 2;
                   1043:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1044:        break;
                   1045:        /*}}}  */
                   1046:     case 29:
                   1047:        /* circle15 */
                   1048:        fprintf(gpoutfile, "group([\n");
                   1049:        fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1050:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1051:        fprintf(gpoutfile,
                   1052:                "arc('%s',1,1,1,0,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,0,%.1f,%.1f,5760,17280,%u,0,0,8,3,0,[\n]).\n",
                   1053:                sActColor, x - p, y - p, x, y, x, y - p, x + p, y, 2 * p, 2 * p, uActNr++);
                   1054:        uActNr += 2;
                   1055:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1056:        break;
                   1057:        /*}}}  */
                   1058:     case 30:
                   1059:        /* circle16 */
                   1060:        fprintf(gpoutfile, "oval('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1061:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                   1062:        uActNr++;
                   1063:        break;
                   1064:        /*}}}  */
                   1065:     case 31:
                   1066:        /* box1 */
                   1067:        fprintf(gpoutfile, "group([\n");
                   1068:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1069:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1070:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1071:                sActColor, x - p / 4, y - p, x + p / 4, y, uActNr++);
                   1072:        uActNr += 2;
                   1073:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1074:        break;
                   1075:        /*}}}  */
                   1076:     case 32:
                   1077:        /* box2 */
                   1078:        fprintf(gpoutfile, "group([\n");
                   1079:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1080:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1081:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1082:                sActColor, x, y - p, x + p, y, uActNr++);
                   1083:        uActNr += 2;
                   1084:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1085:        break;
                   1086:        /*}}}  */
                   1087:     case 33:
                   1088:        /* box3 */
                   1089:        fprintf(gpoutfile, "group([\n");
                   1090:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1091:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1092:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1093:                sActColor, x - p, y - p, x, y, uActNr++);
                   1094:        uActNr += 2;
                   1095:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1096:        break;
                   1097:        /*}}}  */
                   1098:     case 34:
                   1099:        /* box4 */
                   1100:        fprintf(gpoutfile, "group([\n");
                   1101:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1102:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1103:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1104:                sActColor, x - p, y - p, x + p, y, uActNr++);
                   1105:        uActNr += 2;
                   1106:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1107:        break;
                   1108:        /*}}}  */
                   1109:     case 35:
                   1110:        /* box5 */
                   1111:        fprintf(gpoutfile, "group([\n");
                   1112:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1113:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1114:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1115:                sActColor, x - p, y, x, y + p, uActNr++);
                   1116:        uActNr += 2;
                   1117:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1118:        break;
                   1119:        /*}}}  */
                   1120:     case 36:
                   1121:        /* box6 */
                   1122:        fprintf(gpoutfile, "group([\n");
                   1123:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1124:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1125:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1126:                sActColor, x, y - p, x + p, y, uActNr++);
                   1127:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1128:                sActColor, x - p, y, x, y + p, uActNr++);
                   1129:        uActNr += 3;
                   1130:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1131:        break;
                   1132:        /*}}}  */
                   1133:     case 37:
                   1134:        /* box7 */
                   1135:        fprintf(gpoutfile, "group([\n");
                   1136:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1137:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1138:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1139:                sActColor, x - p, y - p, x, y + p, uActNr++);
                   1140:        uActNr += 2;
                   1141:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1142:        break;
                   1143:        /*}}}  */
                   1144:     case 38:
                   1145:        /* box8 */
                   1146:        fprintf(gpoutfile, "group([\n");
                   1147:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1148:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1149:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1150:                sActColor, x - p, y - p, x + p, y, uActNr++);
                   1151:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1152:                sActColor, x - p, y, x, y + p, uActNr++);
                   1153:        uActNr += 3;
                   1154:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1155:        break;
                   1156:        /*}}}  */
                   1157:     case 39:
                   1158:        /* box9 */
                   1159:        fprintf(gpoutfile, "group([\n");
                   1160:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1161:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1162:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1163:                sActColor, x, y, x + p, y + p, uActNr++);
                   1164:        uActNr += 2;
                   1165:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1166:        break;
                   1167:        /*}}}  */
                   1168:     case 40:
                   1169:        /* box10 */
                   1170:        fprintf(gpoutfile, "group([\n");
                   1171:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1172:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1173:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1174:                sActColor, x, y - p, x + p, y + p, uActNr++);
                   1175:        uActNr += 2;
                   1176:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1177:        break;
                   1178:        /*}}}  */
                   1179:     case 41:
                   1180:        /* box11 */
                   1181:        fprintf(gpoutfile, "group([\n");
                   1182:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1183:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1184:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1185:                sActColor, x - p, y - p, x, y, uActNr++);
                   1186:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1187:                sActColor, x, y, x + p, y + p, uActNr++);
                   1188:        uActNr += 3;
                   1189:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1190:        break;
                   1191:        /*}}}  */
                   1192:     case 42:
                   1193:        /* box12 */
                   1194:        fprintf(gpoutfile, "group([\n");
                   1195:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1196:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1197:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1198:                sActColor, x - p, y - p, x + p, y, uActNr++);
                   1199:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1200:                sActColor, x, y, x + p, y + p, uActNr++);
                   1201:        uActNr += 3;
                   1202:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1203:        break;
                   1204:        /*}}}  */
                   1205:     case 43:
                   1206:        /* box13 */
                   1207:        fprintf(gpoutfile, "group([\n");
                   1208:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1209:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1210:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1211:                sActColor, x - p, y, x + p, y + p, uActNr++);
                   1212:        uActNr += 2;
                   1213:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1214:        break;
                   1215:        /*}}}  */
                   1216:     case 44:
                   1217:        /* box14 */
                   1218:        fprintf(gpoutfile, "group([\n");
                   1219:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1220:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1221:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1222:                sActColor, x, y - p, x + p, y, uActNr++);
                   1223:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1224:                sActColor, x - p, y, x + p, y + p, uActNr++);
                   1225:        uActNr += 3;
                   1226:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1227:        break;
                   1228:        /*}}}  */
                   1229:     case 45:
                   1230:        /* box15 */
                   1231:        fprintf(gpoutfile, "group([\n");
                   1232:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,2,1,1,%u,0,0,0,[\n]).\n",
                   1233:                sActColor, x - p, y - p, x + p, y + p, uActNr++);
                   1234:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1235:                sActColor, x - p, y - p, x, y, uActNr++);
                   1236:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1237:                sActColor, x - p, y, x + p, y + p, uActNr++);
                   1238:        uActNr += 3;
                   1239:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1240:        break;
                   1241:        /*}}}  */
                   1242:     case 46:
                   1243:        /* box16 */
                   1244:        fprintf(gpoutfile, "box('%s',%.1f,%.1f,%.1f,%.1f,1,1,1,%u,0,0,0,[\n]).\n",
                   1245:                sActColor, x - p, y - p, x + p, y + p, uActNr);
                   1246:        uActNr++;
                   1247:        break;
                   1248:        /*}}}  */
                   1249:     case 47:
                   1250:        /* diamond1 */
                   1251:        fprintf(gpoutfile, "group([\n");
                   1252:        fprintf(gpoutfile,
                   1253:                "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",
                   1254:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1255:        fprintf(gpoutfile,
                   1256:                "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",
                   1257:                sActColor, x - 0.625 * p, y - 0.375 * p, x - 0.375 * p, y - 0.625 * p, x + p / 8,
                   1258:                y - p / 8, x - p / 8, y + p / 8, x - 0.625 * p, y - 0.375 * p, uActNr);
                   1259:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1260:        uActNr += 2;
                   1261:        break;
                   1262:        /*}}}  */
                   1263:     case 48:
                   1264:        /* diamond2 */
                   1265:        fprintf(gpoutfile, "group([\n");
                   1266:        fprintf(gpoutfile,
                   1267:                "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",
                   1268:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1269:        fprintf(gpoutfile,
                   1270:                "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",
                   1271:                sActColor, x - p / 2, y - p / 2, x, y - p, x + p / 2, y - p / 2, x, y, x - p / 2,
                   1272:                y - p / 2, uActNr);
                   1273:        uActNr += 2;
                   1274:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1275:        break;
                   1276:        /*}}}  */
                   1277:     case 49:
                   1278:        /* diamond3 */
                   1279:        fprintf(gpoutfile, "group([\n");
                   1280:        fprintf(gpoutfile,
                   1281:                "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",
                   1282:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1283:        fprintf(gpoutfile,
                   1284:                "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",
                   1285:                sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x - p / 2, y + p / 2, x - p, y, uActNr);
                   1286:        uActNr += 2;
                   1287:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1288:        break;
                   1289:        /*}}}  */
                   1290:     case 50:
                   1291:        /* diamond4 */
                   1292:        fprintf(gpoutfile, "group([\n");
                   1293:        fprintf(gpoutfile,
                   1294:                "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",
                   1295:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1296:        fprintf(gpoutfile,
                   1297:                "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",
                   1298:                sActColor, x - p, y, x, y - p, x + p / 2, y - p / 2, x - p / 2, y + p / 2, x - p,
                   1299:                y, uActNr);
                   1300:        uActNr += 2;
                   1301:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1302:        break;
                   1303:        /*}}}  */
                   1304:     case 51:
                   1305:        /* diamond5 */
                   1306:        fprintf(gpoutfile, "group([\n");
                   1307:        fprintf(gpoutfile,
                   1308:                "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",
                   1309:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1310:        fprintf(gpoutfile,
                   1311:                "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",
                   1312:                sActColor, x - p / 2, y + p / 2, x, y, x + p / 2, y + p / 2, x, y + p, x - p / 2,
                   1313:                y + p / 2, uActNr);
                   1314:        uActNr += 2;
                   1315:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1316:        break;
                   1317:        /*}}}  */
                   1318:     case 52:
                   1319:        /* diamond6 */
                   1320:        fprintf(gpoutfile, "group([\n");
                   1321:        fprintf(gpoutfile,
                   1322:                "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",
                   1323:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1324:        fprintf(gpoutfile,
                   1325:                "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",
                   1326:                sActColor, x - p / 2, y - p / 2, x, y - p, x + p / 2, y - p / 2, x, y, x - p / 2,
                   1327:                y - p / 2, uActNr);
                   1328:        fprintf(gpoutfile,
                   1329:                "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",
                   1330:                sActColor, x - p / 2, y + p / 2, x, y, x + p / 2, y + p / 2, x, y + p, x - p / 2,
                   1331:                y + p / 2, uActNr);
                   1332:        uActNr += 3;
                   1333:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1334:        break;
                   1335:        /*}}}  */
                   1336:     case 53:
                   1337:        /* diamond7 */
                   1338:        fprintf(gpoutfile, "group([\n");
                   1339:        fprintf(gpoutfile,
                   1340:                "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",
                   1341:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1342:        fprintf(gpoutfile,
                   1343:                "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",
                   1344:                sActColor, x - p, y, x - p / 2, y - p / 2, x + p / 2, y + p / 2, x, y + p, x - p,
                   1345:                y, uActNr);
                   1346:        uActNr += 2;
                   1347:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1348:        break;
                   1349:        /*}}}  */
                   1350:     case 54:
                   1351:        /* diamond8 */
                   1352:        fprintf(gpoutfile, "group([\n");
                   1353:        fprintf(gpoutfile,
                   1354:                "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",
                   1355:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1356:        fprintf(gpoutfile,
                   1357:                "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
                   1358:                sActColor, x - p, y, x, y - p, x + p / 2, y - p / 2, x, y, x + p / 2, y + p / 2,
                   1359:                x, y + p, x - p, y, uActNr);
                   1360:        uActNr += 2;
                   1361:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1362:        break;
                   1363:        /*}}}  */
                   1364:     case 55:
                   1365:        /* diamond9 */
                   1366:        fprintf(gpoutfile, "group([\n");
                   1367:        fprintf(gpoutfile,
                   1368:                "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",
                   1369:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1370:        fprintf(gpoutfile,
                   1371:                "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",
                   1372:                sActColor, x, y, x + p / 2, y - p / 2, x + p, y, x + p / 2, y + p / 2, x, y, uActNr);
                   1373:        uActNr += 2;
                   1374:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1375:        break;
                   1376:        /*}}}  */
                   1377:     case 56:
                   1378:        /* diamond10 */
                   1379:        fprintf(gpoutfile, "group([\n");
                   1380:        fprintf(gpoutfile,
                   1381:                "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",
                   1382:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1383:        fprintf(gpoutfile,
                   1384:                "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",
                   1385:                sActColor, x - p / 2, y - p / 2, x, y - p, x + p, y, x + p / 2, y + p / 2, x - p /
                   1386:                2, y - p / 2, uActNr);
                   1387:        uActNr += 2;
                   1388:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1389:        break;
                   1390:        /*}}}  */
                   1391:     case 57:
                   1392:        /* diamond11 */
                   1393:        fprintf(gpoutfile, "group([\n");
                   1394:        fprintf(gpoutfile,
                   1395:                "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",
                   1396:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1397:        fprintf(gpoutfile,
                   1398:                "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",
                   1399:                sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x - p / 2, y + p / 2, x - p, y, uActNr);
                   1400:        fprintf(gpoutfile,
                   1401:                "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",
                   1402:                sActColor, x, y, x + p / 2, y - p / 2, x + p, y, x + p / 2, y + p / 2, x, y, uActNr);
                   1403:        uActNr += 3;
                   1404:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1405:        break;
                   1406:        /*}}}  */
                   1407:     case 58:
                   1408:        /* diamond12 */
                   1409:        fprintf(gpoutfile, "group([\n");
                   1410:        fprintf(gpoutfile,
                   1411:                "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",
                   1412:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1413:        fprintf(gpoutfile,
                   1414:                "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
                   1415:                sActColor, x - p, y, x, y - p, x + p, y, x + p / 2, y + p / 2, x, y, x - p / 2, y
                   1416:                + p / 2, x - p, y, uActNr);
                   1417:        uActNr += 2;
                   1418:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1419:        break;
                   1420:        /*}}}  */
                   1421:     case 59:
                   1422:        /* diamond13 */
                   1423:        fprintf(gpoutfile, "group([\n");
                   1424:        fprintf(gpoutfile,
                   1425:                "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",
                   1426:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1427:        fprintf(gpoutfile,
                   1428:                "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",
                   1429:                sActColor, x - p / 2, y + p / 2, x + p / 2, y - p / 2, x + p, y, x, y + p, x - p /
                   1430:                2, y + p / 2, uActNr);
                   1431:        uActNr += 2;
                   1432:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1433:        break;
                   1434:        /*}}}  */
                   1435:     case 60:
                   1436:        /* diamond14 */
                   1437:        fprintf(gpoutfile, "group([\n");
                   1438:        fprintf(gpoutfile,
                   1439:                "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",
                   1440:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1441:        fprintf(gpoutfile,
                   1442:                "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
                   1443:                sActColor, x - p / 2, y - p / 2, x, y - p, x + p, y, x, y + p, x - p / 2, y + p /
                   1444:                2, x, y, x - p / 2, y - p / 2, uActNr);
                   1445:        uActNr += 2;
                   1446:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1447:        break;
                   1448:        /*}}}  */
                   1449:     case 61:
                   1450:        /* diamond15 */
                   1451:        fprintf(gpoutfile, "group([\n");
                   1452:        fprintf(gpoutfile,
                   1453:                "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",
                   1454:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1455:        fprintf(gpoutfile,
                   1456:                "polygon('%s',7,[\n%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",
                   1457:                sActColor, x - p, y, x - p / 2, y - p / 2, x, y, x + p / 2, y - p / 2, x + p, y,
                   1458:                x, y + p, x - p, y, uActNr);
                   1459:        uActNr += 2;
                   1460:        fprintf(gpoutfile, "],\n%u,0,[\n]).\n", uActNr++);
                   1461:        break;
                   1462:        /*}}}  */
                   1463:     case 62:
                   1464:        /* diamond16 */
                   1465:        fprintf(gpoutfile,
                   1466:                "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",
                   1467:                sActColor, x, y + p, x + p, y, x, y - p, x - p, y, x, y + p, uActNr);
                   1468:        uActNr++;
                   1469:        break;
                   1470:        /*}}}  */
                   1471:
                   1472:     }                          /* switch */
                   1473: }                              /* TGIF_point */
                   1474:
                   1475: /*}}}  */
                   1476: /***************************************************************************/
1.1.1.3 ! ohara    1477: TERM_PUBLIC void
        !          1478: TGIF_set_pointsize(size)
1.1       maekawa  1479: double size;
                   1480: {
                   1481:     uActPointSize = size;
                   1482: }
                   1483:
                   1484: /*}}}  */
                   1485: /***************************************************************************/
1.1.1.3 ! ohara    1486: TERM_PUBLIC int
        !          1487: TGIF_set_font(font) /* Entry font as added by DJL in post.trm */
1.1       maekawa  1488: char *font;
                   1489: {
                   1490:     char name[32];
1.1.1.3 ! ohara    1491:     int size;
        !          1492:     size_t sep;
1.1       maekawa  1493:
                   1494:     sep = strcspn(font, ",");
                   1495:     strncpy(name, font, sep);
                   1496:     name[sep] = NUL;
                   1497:     size = uActFontSize;
                   1498:     sscanf(&(font[sep + 1]), "%d", &size);
                   1499:     uActFontSize = size;
                   1500:     return TRUE;
                   1501: }
                   1502:
1.1.1.3 ! ohara    1503: #ifdef PM3D
        !          1504: TERM_PUBLIC int TGIF_make_palette(t_sm_palette *palette)
        !          1505: {
        !          1506:     int i;
        !          1507:
        !          1508:     /* Query to determine palette size */
        !          1509:     if (palette==NULL) {
        !          1510:        return(TGIF_palette_size); /* How big is palette ? */
        !          1511:     }
        !          1512:
        !          1513:     TGIF_flush_poly(); /* Clean up current data */
        !          1514:
        !          1515:     if (TGIF_palette_set == FALSE) {
        !          1516:        /* Create new palette */
        !          1517:        for (i = 0; i < sm_palette.colors; i++) {
        !          1518:            sprintf(TGIF_colours[i],"#%.2x%.2x%.2x",
        !          1519:                (int)( palette->color[i].r * 255 + 0.5 ),
        !          1520:                (int)( palette->color[i].g * 255 + 0.5 ),
        !          1521:                (int)( palette->color[i].b * 255 + 0.5 ) );
        !          1522:        }
        !          1523:        TGIF_palette_set = TRUE;
        !          1524:     } else {
        !          1525:        fprintf(stderr, "Attempt to set palette twice\n");
        !          1526:     }
        !          1527:     return(0);
        !          1528: }
        !          1529:
        !          1530: TERM_PUBLIC void TGIF_set_color(double gray)
        !          1531: {
        !          1532:     if (TGIF_palette_set == FALSE) {
        !          1533:        fprintf(stderr,"Palette used before set\n"); /* Error condition */
        !          1534:     }
        !          1535:     sprintf(sActColor,"%s",TGIF_colours[(int)(gray*TGIF_palette_size)]);
        !          1536: }
        !          1537:
        !          1538: TERM_PUBLIC void TGIF_filled_polygon(int points, gpiPoint *corners)
        !          1539: {
        !          1540:     int i;
        !          1541:
        !          1542:     if (TGIF_palette_set == FALSE) {
        !          1543:        fprintf(stderr,"Palette used before set\n"); /* Error condition */
        !          1544:     }
        !          1545:
        !          1546:     if (eTgifState == INPOLY)
        !          1547:        TGIF_flush_poly(); /* Clean up current data */
        !          1548:
        !          1549:     fprintf(gpoutfile, "polygon('%s',%d,[\n",sActColor,points+1);
        !          1550: /* loop through points, do the first one last as well as first */
        !          1551:     fprintf(gpoutfile,"%u,%u",(corners[0].x+uXshift),(uYshift-corners[0].y));
        !          1552:     for (i=1;i<points;i++) {
        !          1553:        fprintf(gpoutfile, ",%u,%u",(corners[i].x+uXshift),(uYshift-corners[i].y));
        !          1554:     }
        !          1555:     fprintf(gpoutfile,",%u,%u",(corners[0].x+uXshift),(uYshift-corners[0].y));
        !          1556:     fprintf(gpoutfile, "],1,1,1,0,%u,0,0,0,0,0,[\n]).\n",uActNr);
        !          1557:     uActNr++;
        !          1558: }
        !          1559: #endif /* PM3D */
        !          1560:
1.1       maekawa  1561: /*}}}  */
                   1562: /***************************************************************************/
                   1563:
                   1564: #endif /* TERM_BODY */
                   1565:
                   1566: #ifdef TERM_TABLE
                   1567:
                   1568: TERM_TABLE_START(tgif_driver)
1.1.1.3 ! ohara    1569:     "tgif",
        !          1570:     "TGIF X11 [mode] [x,y] [dashed] [\042font\042 [fontsize]]",
        !          1571:     TGIF_XMAX, TGIF_YMAX, TGIF_VCHAR, TGIF_HCHAR,
        !          1572:     TGIF_VTIC, TGIF_HTIC, TGIF_options, TGIF_init, TGIF_reset,
        !          1573:     TGIF_text, null_scale, TGIF_graphics, TGIF_move, TGIF_vector,
        !          1574:     TGIF_linetype, TGIF_put_text, TGIF_text_angle,
        !          1575:     TGIF_justify_text, TGIF_point, TGIF_arrow, TGIF_set_font,
        !          1576:     TGIF_set_pointsize, TERM_CAN_MULTIPLOT, 0, 0, 0, 0
        !          1577: #ifdef PM3D
        !          1578: #ifdef USE_MOUSE
        !          1579:     ,0, 0, 0, 0, 0 /* no mouse support for the tgif terminal */
        !          1580: #endif
        !          1581:     , TGIF_make_palette, 0 /*previous_palette*/, TGIF_set_color, TGIF_filled_polygon
        !          1582: #endif /* PM3D */
1.1       maekawa  1583: TERM_TABLE_END(tgif_driver)
                   1584:
1.1.1.3 ! ohara    1585: #undef LAST_TERM
1.1       maekawa  1586: #define LAST_TERM tgif_driver
                   1587:
                   1588: #endif /* TERM_TABLE */
                   1589:
                   1590: #endif /* TERM_PROTO_ONLY */
                   1591:
                   1592: #ifdef TERM_HELP
                   1593: START_HELP(tgif)
                   1594: "1 tgif",
                   1595: "?commands set terminal tgif",
                   1596: "?set terminal tgif",
                   1597: "?set term tgif",
                   1598: "?terminal tgif",
                   1599: "?term tgif",
                   1600: "?tgif",
                   1601: " Tgif is an X11-based drawing tool---it has nothing to do with GIF.",
                   1602: "",
                   1603: " The `tgif` driver supports different pointsizes (with `set pointsize`),",
                   1604: " different label fonts and font sizes (e.g. `set label \"Hallo\" at x,y font",
                   1605: " \"Helvetica,34\"`) and multiple graphs on the page.  The proportions of the",
                   1606: " axes are not changed.",
                   1607: "",
                   1608: " Syntax:",
                   1609: "       set terminal tgif {portrait | landscape} {<[x,y]>}",
                   1610: "                         {solid | dashed}",
                   1611: "                         {\"<fontname>\"} {<fontsize>}",
                   1612: "",
                   1613: " where <[x,y]> specifies the number of graphs in the x and y directions on the",
                   1614: " page, \"<fontname>\" is the name of a valid PostScript font, and <fontsize>",
                   1615: " specifies the size of the PostScript font.  Defaults are `portrait`, `[1,1]`,",
                   1616: " `dashed`, `\"Helvetica\"`, and `18`.",
                   1617: "",
                   1618: " The `solid` option is usually prefered if lines are colored, as they often",
                   1619: " are in the editor.  Hardcopy will be black-and-white, so `dashed` should be",
                   1620: " chosen for that.",
                   1621: "",
                   1622: " Multiplot is implemented in two different ways.",
                   1623: "",
                   1624: " The first multiplot implementation is the standard gnuplot multiplot feature:",
                   1625: "",
                   1626: "       set terminal tgif",
                   1627: "       set output \"file.obj\"",
                   1628: "       set multiplot",
                   1629: "       set origin x01,y01",
                   1630: "       set size  xs,ys",
                   1631: "       plot ...",
                   1632: "            ...",
                   1633: "       set origin x02,y02",
                   1634: "       plot ...",
                   1635: "       set nomultiplot",
                   1636: "",
                   1637: " See `set multiplot` for further information.",
                   1638: "",
                   1639: " The second version is the [x,y] option for the driver itself.  The advantage",
                   1640: " of this implementation is that everything is scaled and placed automatically",
                   1641: " without the need for setting origins and sizes; the graphs keep their natural",
                   1642: " x/y proportions of 3/2 (or whatever is fixed by `set size`).",
                   1643: "",
                   1644: " If both multiplot methods are selected, the standard method is chosen and a",
                   1645: " warning message is given.",
                   1646: "",
                   1647: " Examples of single plots (or standard multiplot):",
                   1648: "       set terminal tgif                  # defaults",
                   1649: "       set terminal tgif \"Times-Roman\" 24",
                   1650: "       set terminal tgif landscape",
                   1651: "       set terminal tgif landscape solid",
                   1652: "",
                   1653: " Examples using the built-in multiplot mechanism:",
                   1654: "       set terminal tgif portrait [2,4]  # portrait; 2 plots in the x-",
                   1655: "                                         # and 4 in the y-direction",
                   1656: "       set terminal tgif [1,2]           # portrait; 1 plot in the x-",
                   1657: "                                         # and 2 in the y-direction",
                   1658: "       set terminal tgif landscape [3,3] # landscape; 3 plots in both",
                   1659: "                                         # directions"
                   1660: END_HELP(tgif)
                   1661: #endif
                   1662: /*{{{}}}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>