home *** CD-ROM | disk | FTP | other *** search
- #include <stdlib.h>
- #include <stdio.h>
- #include "pgl.h"
- char string[9][20] = { "SOLID LINE",
- "HUGE DASH LINE",
- "LARGE DASH LINE",
- "MEDIUM DASH LINE",
- "SMALL DASH LINE",
- "WIDE DOT LINE",
- "CLOSE DOT LINE",
- "DASH DOT LINE",
- "CENTER LINE" };
-
-
- main()
-
- {
- int err=0, j, maxx, y;
- pgInitDrw( "linepat.plt", 2000, 2000, &err );
- if( err != 0 )
- {
- printf( "ERROR IN INITDRW ROUTINE" );
- exit( 1 );
- }
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextJustify( pgCENTER, pgBOTTOM );
- pgSetCharSpacing( 3 );
- pgSetTextScaling( 2, 1, 2, 1 );
-
- maxx = pgGetMaxX();
- /*
- * Compare the different line styles.
- */
- pgSetTextJustify( pgLEFT, pgBOTTOM );
- pgSetColor( 1 );
- y = 200;
- for( j=0; j<9; j++ )
- {
- pgSetLineStyle( j, 10 );
- pgSetLineWeight( 50 );
- pgLine( 0, y, maxx/2, y );
- pgDrawTextXY( maxx/2+100, y, string[j] );
- y += 200;
- }
- pgEndDrw();
- }