/* Copyright (C) 2017-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4grepp.ctr */ /** @file dk4grepp.c The dk4grepp module. */ #line 9 "dk4grepp.ctr" #include "dk4conf.h" #include #ifndef DK4GRA_H_INCLUDED #include "dk4gra.h" #endif #ifndef GRA_H_INCLUDED #include "gra.h" #endif #if DK4_HAVE_ASSERT_H #ifndef ASSERT_H_INCLUDED #include #define ASSERT_H_INCLUDED 1 #endif #endif /** Pattern procedure. */ static const char * const p00[] = { /* 0 */ "/ThirtyLeft\t\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub 3.0 sqrt div\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 5 index 1 index\t\t\t% xs xe ys ye dy ydiff y xe y", /* 7 */ " 8 index 1 index 5 index add\t\t% xs xe ys ye dy ydiff y xe y xs y2", /* 8 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xe y", /* 9 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 10 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " }", /* 12 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 13 */ " pop pop pop pop pop pop pop\t\t% --", /* 14 */ "} bind def", NULL #line 50 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p01[] = { /* 0 */ "/ThirtyRight\t\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub 3.0 sqrt div\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 6 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y", /* 7 */ " 7 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y xe y", /* 8 */ " 5 index add\t\t\t\t% xs xe ys ye dy ydiff y xs y xe y2", /* 9 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xs y", /* 10 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 12 */ " }", /* 13 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 14 */ " pop pop pop pop pop pop pop\t\t% --", /* 15 */ "} bind def", NULL #line 75 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p02[] = { /* 0 */ "/ThirtyHatch\t\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub 3.0 sqrt div\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 6 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y", /* 7 */ " 7 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y xe y", /* 8 */ " 5 index add\t\t\t\t% xs xe ys ye dy ydiff y xs y xe y2", /* 9 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xs y", /* 10 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 12 */ " }", /* 13 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 14 */ " pop pop\t\t\t\t% xs xe ys ye dy", /* 15 */ " 3 index 5 index sub 3.0 sqrt div\t% xs xe ys ye dy ydiff", /* 16 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 17 */ " {", /* 18 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 19 */ " 5 index 1 index\t\t\t% xs xe ys ye dy ydiff y xe y", /* 20 */ " 8 index 1 index 5 index add\t\t% xs xe ys ye dy ydiff y xe y xs y2", /* 21 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xe y", /* 22 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 23 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 24 */ " }", /* 25 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 26 */ " pop pop pop pop pop pop pop\t\t% --", /* 27 */ "} bind def", NULL #line 112 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p03[] = { /* 0 */ "/FourtyFiveLeft\t\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub \t\t\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 5 index 1 index\t\t\t% xs xe ys ye dy ydiff y xe y", /* 7 */ " 8 index 1 index 5 index add\t\t% xs xe ys ye dy ydiff y xe y xs y2", /* 8 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xe y", /* 9 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 10 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " }", /* 12 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 13 */ " pop pop pop pop pop pop pop\t\t% --", /* 14 */ "} bind def", NULL #line 136 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p04[] = { /* 0 */ "/FourtyFiveRight\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub \t\t\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 6 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y", /* 7 */ " 7 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y xe y", /* 8 */ " 5 index add\t\t\t\t% xs xe ys ye dy ydiff y xs y xe y2", /* 9 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xs y", /* 10 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 12 */ " }", /* 13 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 14 */ " pop pop pop pop pop pop pop\t\t% --", /* 15 */ "} bind def", NULL #line 161 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p05[] = { /* 0 */ "/FourtyFiveHatch\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 3 index 5 index sub \t\t\t% xs xe ys ye dy ydiff", /* 3 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 6 */ " 5 index 1 index\t\t\t% xs xe ys ye dy ydiff y xe y", /* 7 */ " 8 index 1 index 5 index add\t\t% xs xe ys ye dy ydiff y xe y xs y2", /* 8 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xe y", /* 9 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 10 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 11 */ " }", /* 12 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 13 */ " pop pop \t\t\t\t% xs xe ys ye dy", /* 14 */ " 3 index 5 index sub \t\t\t% xs xe ys ye dy ydiff", /* 15 */ " 3 index\t\t\t\t% xs xe ys ye dy ydiff y", /* 16 */ " {", /* 17 */ " dup 4 index gt {exit} if\t\t% xs xe ys ye dy ydiff y", /* 18 */ " 6 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y", /* 19 */ " 7 index 1 index\t\t\t% xs xe ys ye dy ydiff y xs y xe y", /* 20 */ " 5 index add\t\t\t\t% xs xe ys ye dy ydiff y xs y xe y2", /* 21 */ " newpath moveto\t\t\t% xs xe ys ye dy ydiff y xs y", /* 22 */ " lineto stroke\t\t\t% xs xe ys ye dy ydiff y", /* 23 */ " 2 index add\t\t\t\t% xs xe ys ye dy ydiff y", /* 24 */ " }", /* 25 */ " loop\t\t\t\t\t% xs xe ys ye dy ydiff y", /* 26 */ " pop pop pop pop pop pop pop\t\t% --", /* 27 */ "} bind def", NULL #line 198 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p06[] = { /* 0 */ "/HorizontalBricks\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 2 index 0\t\t\t\t% xs xe ys ye dy y nr", /* 3 */ " {", /* 4 */ " 1 index\t\t\t\t% xs xe ys ye dy y nr y", /* 5 */ " 4 index\t\t\t\t% xs xe ys ye dy y nr y ye", /* 6 */ " gt {exit} if\t\t\t% xs xe ys ye dy y nr", /* 7 */ " 6 index\t\t\t\t% xs xe ys ye dy y nr xs", /* 8 */ " 2 index\t\t\t\t% xs xe ys ye dy y nr xs y", /* 9 */ " 7 index\t\t\t\t% xs xe ys ye dy y nr xs y xe", /* 10 */ " 1 index\t\t\t\t% xs xe ys ye dy y nr xs y xe y", /* 11 */ " newpath moveto lineto stroke\t% xs xe ys ye dy y nr", /* 12 */ " 6 index\t\t\t\t% xs xe ys ye dy y nr x", /* 13 */ " 1 index 0\t\t\t\t% xs xe ys ye dy y nr x nr 0", /* 14 */ " gt {3 index add} if\t\t\t% xs xe ys ye dy y nr x", /* 15 */ " {", /* 16 */ " dup 7 index\t\t\t% xs xe ys ye dy y nr x x xe", /* 17 */ " gt {exit} if\t\t\t% xs xe ys ye dy y nr x", /* 18 */ " dup 3 index\t\t\t% xs xe ys ye dy y nr x x y", /* 19 */ " 1 index 1 index\t\t\t% xs xe ys ye dy y nr x x y x y", /* 20 */ " 7 index add\t\t\t% xs xe ys ye dy y nr x x y x y", /* 21 */ " newpath moveto lineto stroke\t% xs xe ys ye dy y nr x", /* 22 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dy y nr x", /* 23 */ " }", /* 24 */ " loop\t\t\t\t% xs xe ys ye dy y nr x", /* 25 */ " pop\t\t\t\t\t% xs xe ys ye dy y nr", /* 26 */ " 1 add\t\t\t\t% xs xe ys ye dy y nr", /* 27 */ " dup\t\t\t\t\t% xs xe ys ye dy y nr nr", /* 28 */ " 1 gt {pop 0} if\t\t\t% xs xe ys ye dy y nr", /* 29 */ " exch 2 index add exch\t\t% xs xe ys ye dy y nr", /* 30 */ " }", /* 31 */ " loop\t\t\t\t\t% xs xe ys ye dy y nr", /* 32 */ " pop pop pop pop pop pop pop\t\t% --", /* 33 */ "} bind def", NULL #line 241 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p07[] = { /* 0 */ "/VerticalBricks\t\t\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " 4 index 0\t\t\t\t% xs xe ys ye dx x nr", /* 3 */ " {", /* 4 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x nr x xe", /* 5 */ " gt {exit} if\t\t\t% xs xe ys ye dx x nr", /* 6 */ " 1 index 5 index\t\t\t% xs xe ys ye dx x nr x ys", /* 7 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x nr x ys x ye", /* 8 */ " newpath moveto lineto stroke\t% xs xe ys ye dx x nr", /* 9 */ " 4 index 1 index 0\t\t\t% xs xe ys ye dx x nr y nr 0", /* 10 */ " gt {3 index add} if\t\t\t% xs xe ys ye dx x nr y", /* 11 */ " {", /* 12 */ " dup 5 index\t\t\t% xs xe ys ye dx x nr y y ye", /* 13 */ " gt {exit} if\t\t\t% xs xe ys ye dx x nr y", /* 14 */ " 2 index 1 index\t\t\t% xs xe ys ye dx x nr y x y", /* 15 */ " dup 2 index\t\t\t% xs xe ys ye dx x nr y x y y x", /* 16 */ " 7 index add exch\t\t\t% xs xe ys ye dx x nr y x y x y", /* 17 */ " newpath moveto lineto stroke\t% xs xe ys ye dx x nr y", /* 18 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dx x nr y", /* 19 */ " }", /* 20 */ " loop\t\t\t\t% xs xe ys ye dx x nr y", /* 21 */ " pop\t\t\t\t\t% xs xe ys ye dx x nr", /* 22 */ " exch 2 index add exch\t\t% xs xe ys ye dx x nr", /* 23 */ " 1 add\t\t\t\t% xs xe ys ye dx x nr", /* 24 */ " dup 1\t\t\t\t% xs xe ys ye dx x nr nr 1", /* 25 */ " gt {pop 0} if\t\t\t% xs xe ys ye dx x nr", /* 26 */ " }", /* 27 */ " loop\t\t\t\t\t% xs xe ys ye dx x nr", /* 28 */ " pop pop pop pop pop pop pop\t\t% --", /* 29 */ "} bind def", NULL #line 280 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p08[] = { /* 0 */ "/HorizontalLines\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 2 index\t\t\t\t% xs xe ys ye dy y", /* 3 */ " {", /* 4 */ " dup 3 index gt {exit} if\t\t% xs xe ys ye dy y", /* 5 */ " 4 index 1 index\t\t\t% xs xe ys ye dy y xe y", /* 6 */ " 7 index 1 index\t\t\t% xs xe ys ye dy y xe y xs y", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dy y xe y", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dy y", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dy y", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dy y", /* 12 */ " pop pop pop pop pop pop\t\t% --", /* 13 */ "} bind def", NULL #line 303 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p09[] = { /* 0 */ "/VerticalLines\t\t\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " 4 index\t\t\t\t% xs xe ys ye dx x", /* 3 */ " {", /* 4 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x", /* 5 */ " dup 3 index\t\t\t\t% xs xe ys ye dx x x ye", /* 6 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x x ye x ys", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dx x x ye", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dx x", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dx x", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dx x", /* 12 */ " pop pop pop pop pop pop\t\t% --", /* 13 */ "} bind def", NULL #line 326 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p10[] = { /* 0 */ "/CrossHatch\t\t\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " 4 index\t\t\t\t% xs xe ys ye dx x", /* 3 */ " {", /* 4 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x", /* 5 */ " dup 3 index\t\t\t\t% xs xe ys ye dx x x ye", /* 6 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x x ye x ys", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dx x x ye", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dx x", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dx x", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dx x", /* 12 */ " pop\t\t\t\t\t% xs xe ys ye dy", /* 13 */ " 2 index\t\t\t\t% xs xe ys ye dy y", /* 14 */ " {", /* 15 */ " dup 3 index gt {exit} if\t\t% xs xe ys ye dy y", /* 16 */ " 4 index 1 index\t\t\t% xs xe ys ye dy y xe y", /* 17 */ " 7 index 1 index\t\t\t% xs xe ys ye dy y xe y xs y", /* 18 */ " newpath moveto\t\t\t% xs xe ys ye dy y xe y", /* 19 */ " lineto stroke\t\t\t% xs xe ys ye dy y", /* 20 */ " 1 index add\t\t\t\t% xs xe ys ye dy y", /* 21 */ " }", /* 22 */ " loop\t\t\t\t\t% xs xe ys ye dy y", /* 23 */ " pop pop pop pop pop pop\t\t% --", /* 24 */ "} bind def", NULL #line 360 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p11[] = { /* 0 */ "/HorizontalShinglesLeft\t\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 2 index\t\t\t\t% xs xe ys ye dy y", /* 3 */ " {", /* 4 */ " dup 3 index gt {exit} if\t\t% xs xe ys ye dy y", /* 5 */ " 4 index 1 index\t\t\t% xs xe ys ye dy y xe y", /* 6 */ " 7 index 1 index\t\t\t% xs xe ys ye dy y xe y xs y", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dy y xe y", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dy y", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dy y", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dy y", /* 12 */ " pop\t\t\t\t\t% xs xe ys ye dy", /* 13 */ " 2 index 0\t\t\t\t% xs xe ys ye dy y nr", /* 14 */ " {", /* 15 */ " 1 index 4 index gt {exit} if\t% xs xe ys ye dy y nr", /* 16 */ " 6 index\t\t\t\t% xs xe ys ye dy y nr x", /* 17 */ " 1 index 2 gt", /* 18 */ " { 3 index 0.5 mul add }", /* 19 */ " {", /* 20 */ " 1 index 1 gt", /* 21 */ " { 3 index add }", /* 22 */ " {", /* 23 */ " 1 index 0 gt", /* 24 */ "\t{ 3 index 1.5 mul add }", /* 25 */ "\tif", /* 26 */ " }", /* 27 */ " ifelse", /* 28 */ " }", /* 29 */ " ifelse", /* 30 */ " {", /* 31 */ " dup 7 index gt {exit} if\t\t% xs xe ys ye dy y nr x", /* 32 */ " dup 4 index 0.5 mul add\t\t% xs xe ys ye dy y nr x x2", /* 33 */ " 3 index 5 index add\t\t% xs xe ys ye dy y nr x x2 y2", /* 34 */ " 2 index 5 index newpath moveto\t% xs xe ys ye dy y nr x x2 y2", /* 35 */ " lineto stroke\t\t\t% xs xe ys ye dy y nr x", /* 36 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dy y nr x", /* 37 */ " }", /* 38 */ " loop pop\t\t\t\t% xs xe ys ye dy y nr", /* 39 */ " exch 2 index add exch\t\t% xs xe ys ye dy y nr", /* 40 */ " 1 add dup 3 gt {pop 0} if\t\t% xs xe ys ye dy y nr", /* 41 */ " }", /* 42 */ " loop\t\t\t\t\t% xs xe ys ye dy y nr", /* 43 */ " pop pop pop pop pop pop pop", /* 44 */ "} bind def", NULL #line 414 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p12[] = { /* 0 */ "/HorizontalShinglesRight\t\t% xs xe ys ye dy", /* 1 */ "{", /* 2 */ " 2 index\t\t\t\t% xs xe ys ye dy y", /* 3 */ " {", /* 4 */ " dup 3 index gt {exit} if\t\t% xs xe ys ye dy y", /* 5 */ " 4 index 1 index\t\t\t% xs xe ys ye dy y xe y", /* 6 */ " 7 index 1 index\t\t\t% xs xe ys ye dy y xe y xs y", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dy y xe y", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dy y", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dy y", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dy y", /* 12 */ " pop\t\t\t\t\t% xs xe ys ye dy", /* 13 */ " 2 index 0\t\t\t\t% xs xe ys ye dy y nr", /* 14 */ " {", /* 15 */ " 1 index 4 index gt {exit} if\t% xs xe ys ye dy y nr", /* 16 */ " 6 index\t\t\t\t% xs xe ys ye dy y nr x", /* 17 */ " 1 index 4 index 0.5 mul mul add\t% xs xe ys ye dy y nr x", /* 18 */ " {", /* 19 */ " dup 7 index gt {exit} if\t\t% xs xe ys ye dy y nr x", /* 20 */ " dup 3 index 5 index add\t\t% xs xe ys ye dy y nr x x y2", /* 21 */ " 1 index 6 index 0.5 mul add\t% xs xe ys ye dy y nr x x y2 x2", /* 22 */ " 5 index newpath moveto lineto\t% xs xe ys ye dy y nr x", /* 23 */ " stroke", /* 24 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dy y nr x", /* 25 */ " }", /* 26 */ " loop pop\t\t\t\t% xs xe ys ye dy y nr", /* 27 */ " exch 2 index add exch\t\t% xs xe ys ye dy y nr", /* 28 */ " 1 add dup 3 gt {pop 0} if\t\t% xs xe ys ye dy y nr", /* 29 */ " }", /* 30 */ " loop\t\t\t\t\t% xs xe ys ye dy y nr", /* 31 */ " pop pop pop pop pop pop pop", /* 32 */ "} bind def", NULL #line 456 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p13[] = { /* 0 */ "/VerticalShinglesLeft\t\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " 4 index\t\t\t\t% xs xe ys ye dx x", /* 3 */ " {", /* 4 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x", /* 5 */ " dup 3 index\t\t\t\t% xs xe ys ye dx x x ye", /* 6 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x x ye x ys", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dx x x ye", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dx x", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dx x", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dx x", /* 12 */ " pop\t\t\t\t\t% xs xe ys ye dx", /* 13 */ " 4 index 0\t\t\t\t% xs xe ys ye dx x nr", /* 14 */ " {", /* 15 */ " 1 index 6 index gt {exit} if\t% xs xe ys ye dx x nr", /* 16 */ " 4 index\t\t\t\t% xs xe ys ye dx x nr y", /* 17 */ " 3 index 2 index 0.5 mul mul add\t% xs xe ys ye dx x nr y", /* 18 */ " {", /* 19 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x nr y", /* 20 */ " 2 index 1 index\t\t\t% xs xe ys ye dx x nr y x y", /* 21 */ " 5 index 0.5 mul add\t\t% xs xe ys ye dx x nr y x y2", /* 22 */ " 1 index 6 index add 3 index\t% xs xe ys ye dx x nr y x y2 x2 y", /* 23 */ " newpath moveto lineto stroke\t% xs xe ys ye dx x nr y", /* 24 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dx x nr y", /* 25 */ " }", /* 26 */ " loop pop\t\t\t\t% xs xe ys ye dx x nr", /* 27 */ " exch 2 index add exch\t\t% xs xe ys ye dx x nr", /* 28 */ " 1 add dup 3 gt {pop 0} if\t\t% xs xe ys ye dx x nr", /* 29 */ " }", /* 30 */ " loop\t\t\t\t\t% xs xe ys ye dx x nr", /* 31 */ " pop pop pop pop pop pop pop\t\t% --", /* 32 */ "} bind def", NULL #line 498 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p14[] = { /* 0 */ "/VerticalShinglesRight\t\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " 4 index\t\t\t\t% xs xe ys ye dx x", /* 3 */ " {", /* 4 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x", /* 5 */ " dup 3 index\t\t\t\t% xs xe ys ye dx x x ye", /* 6 */ " 1 index 6 index\t\t\t% xs xe ys ye dx x x ye x ys", /* 7 */ " newpath moveto\t\t\t% xs xe ys ye dx x x ye", /* 8 */ " lineto stroke\t\t\t% xs xe ys ye dx x", /* 9 */ " 1 index add\t\t\t\t% xs xe ys ye dx x", /* 10 */ " }", /* 11 */ " loop\t\t\t\t\t% xs xe ys ye dx x", /* 12 */ " pop\t\t\t\t\t% xs xe ys ye dx", /* 13 */ " 4 index 0\t\t\t\t% xs xe ys ye dx x nr", /* 14 */ " {", /* 15 */ " 1 index 6 index gt {exit} if\t% xs xe ys ye dx x nr", /* 16 */ " 4 index\t\t\t\t% xs xe ys ye dx x nr y", /* 17 */ " 1 index 2 gt", /* 18 */ " { 3 index 0.5 mul add }", /* 19 */ " {", /* 20 */ " 1 index 1 gt", /* 21 */ " { 3 index add }", /* 22 */ " {", /* 23 */ " 1 index 0 gt", /* 24 */ "\t{ 3 index 1.5 mul add }", /* 25 */ "\tif", /* 26 */ " }", /* 27 */ " ifelse", /* 28 */ " }", /* 29 */ " ifelse", /* 30 */ " {", /* 31 */ " dup 5 index gt {exit} if\t\t% xs xe ys ye dx x nr y", /* 32 */ " 2 index 1 index\t\t\t% xs xe ys ye dx x nr y x y", /* 33 */ " 1 index 6 index add\t\t% xs xe ys ye dx x nr y x y x2", /* 34 */ " 1 index 7 index 0.5 mul add\t% xs xe ys ye dx x nr y x y x2 y2", /* 35 */ " newpath moveto lineto stroke\t% xs xe ys ye dx x nr y", /* 36 */ " 3 index 2.0 mul add\t\t% xs xe ys ye dx x nr y", /* 37 */ " }", /* 38 */ " loop pop\t\t\t\t% xs xe ys ye dx x nr", /* 39 */ " exch 2 index add exch\t\t% xs xe ys ye dx x nr", /* 40 */ " 1 add dup 3 gt {pop 0} if\t\t% xs xe ys ye dx x nr", /* 41 */ " }", /* 42 */ " loop\t\t\t\t\t% xs xe ys ye dx x nr", /* 43 */ " pop pop pop pop pop pop pop\t\t% --", /* 44 */ "} bind def", NULL #line 552 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p15[] = { /* 0 */ "/FishScales\t\t\t\t% xs xe ys ye dx dy r a1 a2", /* 1 */ "{", /* 2 */ " 6 index 0\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 3 */ " {", /* 4 */ " 1 index 8 index gt {exit} if\t% xs xe ys ye dx dy r a1 a2 y nr", /* 5 */ " 10 index\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 6 */ " 1 index 0 gt", /* 7 */ " { 7 index 0.5 mul add }", /* 8 */ " if", /* 9 */ " {", /* 10 */ " dup 11 index gt {exit} if\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 11 */ " dup 3 index 8 index add\t\t% xs xe ys ye dx dy r a1 a2 y nr x x y+dy", /* 12 */ " newpath moveto\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 13 */ " dup 8 index 0.5 mul add\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm", /* 14 */ " 3 index 7 index add\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm ym", /* 15 */ " 7 index 7 index 7 index\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm ym r a1 a2", /* 16 */ " arc stroke\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 17 */ " 7 index add\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 18 */ " }", /* 19 */ " loop pop\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 20 */ " exch 5 index add exch\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 21 */ " 1 add dup 1 gt {pop 0} if\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 22 */ " }", /* 23 */ " loop\t\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 24 */ " pop pop pop pop pop pop pop pop pop pop pop", /* 25 */ "} bind def", NULL #line 587 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p16[] = { /* 0 */ "/SmallFishScales\t\t\t% xs xe ys ye dx dy r a1 a2", /* 1 */ "{", /* 2 */ " 6 index 0\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 3 */ " {", /* 4 */ " 1 index 8 index gt {exit} if\t% xs xe ys ye dx dy r a1 a2 y nr", /* 5 */ " 10 index\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 6 */ " 1 index 0 gt", /* 7 */ " { 7 index 0.5 mul add }", /* 8 */ " if", /* 9 */ " {", /* 10 */ " dup 11 index gt {exit} if\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 11 */ " dup 3 index 8 index add\t\t% xs xe ys ye dx dy r a1 a2 y nr x x y+dy", /* 12 */ " newpath moveto\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 13 */ " dup 8 index 0.5 mul add\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm", /* 14 */ " 3 index 7 index add\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm ym", /* 15 */ " 7 index 7 index 7 index\t\t% xs xe ys ye dx dy r a1 a2 y nr x xm ym r a1 a2", /* 16 */ " arc stroke\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 17 */ " 7 index add\t\t\t% xs xe ys ye dx dy r a1 a2 y nr x", /* 18 */ " }", /* 19 */ " loop pop\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 20 */ " exch 5 index add exch\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 21 */ " 1 add dup 1 gt {pop 0} if\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 22 */ " }", /* 23 */ " loop\t\t\t\t\t% xs xe ys ye dx dy r a1 a2 y nr", /* 24 */ " pop pop pop pop pop pop pop pop pop pop pop", /* 25 */ "} bind def", NULL #line 622 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p17[] = { /* 0 */ "/Circles\t\t\t% xs xe ys ye r", /* 1 */ "{", /* 2 */ " 2 index\t\t\t% xs xe ys ye r y", /* 3 */ " {", /* 4 */ " dup 3 index gt {exit} if", /* 5 */ " 5 index\t\t\t% xs xe ys ye r y x", /* 6 */ " {", /* 7 */ " dup 6 index gt {exit} if", /* 8 */ " dup 3 index add\t\t% xs xe ys ye r y x xm", /* 9 */ " 2 index 4 index add\t% xs xe ys ye r y x xm ym", /* 10 */ " 4 index 0 360\t\t% xs xe ys ye r y x xm ym r a1 a2", /* 11 */ " 4 index 3 index add\t% xs xe ys ye r y x xm ym r a1 a2 xr", /* 12 */ " 4 index\t\t\t% xs xe ys ye r y x xm ym r a1 a2 xr yr", /* 13 */ " newpath moveto arc", /* 14 */ " closepath stroke\t\t% xs xe ys ye r y x", /* 15 */ " 2 index dup add add", /* 16 */ " }", /* 17 */ " loop pop", /* 18 */ " 1 index dup add add\t\t% xs xe ys ye r y", /* 19 */ " }", /* 20 */ " loop\t\t\t\t% xs xe ys ye r y", /* 21 */ " pop pop pop pop pop pop\t% --", /* 22 */ "} bind def", NULL #line 654 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p18[] = { /* 0 */ "/Hexagons\t\t\t\t% xs xe ys ye dx dy", /* 1 */ "{", /* 2 */ " 1 index 3.0 div\t\t\t% xs xe ys ye dx dy r", /* 3 */ " 4 index\t\t\t\t% xs xe ys ye dx dy r y", /* 4 */ " {", /* 5 */ " dup 5 index gt {exit} if", /* 6 */ " 7 index\t\t\t\t% xs xe ys ye dx dy r y x", /* 7 */ " {", /* 8 */ " dup 8 index gt {exit} if", /* 9 */ " newpath", /* 10 */ " dup 3 index 3.0 mul add\t\t% xs xe ys ye dx dy r y x x0", /* 11 */ " 2 index 5 index 0.5 mul add\t% xs xe ys ye dx dy r y x x0 y0", /* 12 */ " moveto\t\t\t\t% xs xe ys ye dx dy r y x", /* 13 */ " dup 3 index 2.0 mul add\t\t% xs xe ys ye dx dy r y x x1", /* 14 */ " 2 index 5 index 0.5 mul add\t% xs xe ys ye dx dy r y x x1 y1", /* 15 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 16 */ " dup 3 index 1.5 mul add\t\t% xs xe ys ye dx dy r y x x2", /* 17 */ " 2 index 5 index add\t\t% xs xe ys ye dx dy r y x x2 y2", /* 18 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 19 */ " dup 3 index 0.5 mul add\t\t% xs xe ys ye dx dy r y x x3", /* 20 */ " 2 index 5 index add\t\t% xs xe ys ye dx dy r y x x3 y3", /* 21 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 22 */ " dup 2 index 5 index 0.5 mul add\t% xs xe ys ye dx dy r y x x4 y4", /* 23 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 24 */ " dup 3 index 0.5 mul add 2 index\t% xs xe ys ye dx dy r y x x5 y5", /* 25 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 26 */ " dup 3 index 1.5 mul add 2 index\t% xs xe ys ye dx dy r y x x6 y6", /* 27 */ " lineto\t\t\t\t% xs xe ys ye dx dy r y x", /* 28 */ " dup 3 index 2.0 mul add\t\t% xs xe ys ye dx dy r y x x7", /* 29 */ " 2 index 5 index 0.5 mul add\t% xs xe ys ye dx dy r y x x7 y7", /* 30 */ " lineto stroke\t\t\t% xs xe ys ye dx dy r y x", /* 31 */ " 4 index add", /* 32 */ " }", /* 33 */ " loop pop", /* 34 */ " 2 index add", /* 35 */ " }", /* 36 */ " loop pop pop pop pop pop pop pop pop", /* 37 */ "} bind def", NULL #line 701 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p19[] = { /* 0 */ "/Octagons\t\t\t\t% xs xe ys ye dx co", /* 1 */ "{", /* 2 */ " 3 index\t\t\t\t% xs xe ys ye dx co y", /* 3 */ " {", /* 4 */ " dup 4 index gt {exit} if", /* 5 */ " 6 index\t\t\t\t% xs xe ys ye dx co y x", /* 6 */ " {", /* 7 */ " dup 7 index gt {exit} if\t\t% xs xe ys ye dx co y x", /* 8 */ " newpath", /* 9 */ " dup 3 index add\t\t\t% xs xe ys ye dx co y x x0", /* 10 */ " 2 index\t\t\t\t% xs xe ys ye dx co y x x0 y0", /* 11 */ " moveto\t\t\t\t% xs xe ys ye dx co y x", /* 12 */ " dup 4 index add 3 index sub\t% xs xe ys ye dx co y x x1", /* 13 */ " 2 index\t\t\t\t% xs xe ys ye dx co y x x1 y1", /* 14 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 15 */ " dup 4 index add\t\t\t% xs xe ys ye dx co y x x2", /* 16 */ " 2 index 4 index add\t\t% xs xe ys ye dx co y x x2 y2", /* 17 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 18 */ " dup 4 index add\t\t\t% xs xe ys ye dx co y x x3", /* 19 */ " 2 index 5 index add 4 index sub\t% xs xe ys ye dx co y x x3 y3", /* 20 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 21 */ " dup 4 index add 3 index sub\t% xs xe ys ye dx co y x x4", /* 22 */ " 2 index 5 index add\t\t% xs xe ys ye dx co y x x4 y4", /* 23 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 24 */ " dup 3 index add\t\t\t% xs xe ys ye dx co y x x5", /* 25 */ " 2 index 5 index add\t\t% xs xe ys ye dx co y x x5 y5", /* 26 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 27 */ " dup\t\t\t\t% xs xe ys ye dx co y x x6", /* 28 */ " 2 index 5 index add 4 index sub\t% xs xe ys ye dx co y x x6 y6", /* 29 */ " lineto\t\t\t\t% xs xe ys ye dx co y x", /* 30 */ " dup\t\t\t\t% xs xe ys ye dx co y x x7", /* 31 */ " 2 index 4 index add\t\t% xs xe ys ye dx co y x x7 y7", /* 32 */ " lineto closepath stroke\t\t% xs xe ys ye dx co y x", /* 33 */ " 3 index add", /* 34 */ " }", /* 35 */ " loop pop", /* 36 */ " 2 index add", /* 37 */ " }", /* 38 */ " loop pop pop pop pop pop pop pop", /* 39 */ "} bind def", NULL #line 750 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p20[] = { /* 0 */ "/HorizontalTireTreads\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " dup 0.5 mul\t\t\t% xs xe ys ye dx r", /* 3 */ " 3 index\t\t\t% xs xe ys ye dx r y", /* 4 */ " {", /* 5 */ " dup 4 index gt {exit} if", /* 6 */ " 6 index\t\t\t% xs xe ys ye dx r y x", /* 7 */ " {", /* 8 */ " dup 7 index gt {exit} if\t\t% xs xe ys ye dx r y x", /* 9 */ " dup 4 index add 2 index\t\t% xs xe ys ye dx r y x x2 y2", /* 10 */ " 2 index 5 index add\t\t% xs xe ys ye dx r y x x2 y2 x1", /* 11 */ " 4 index 6 index add\t\t% xs xe ys ye dx r y x x2 y2 x1 y1", /* 12 */ " 4 index 6 index\t\t\t% xs xe ys ye dx r y x x2 y2 x1 y1 x0 y0", /* 13 */ " newpath moveto lineto lineto\t% xs xe ys ye dx r y x", /* 14 */ " stroke", /* 15 */ " 3 index add", /* 16 */ " }", /* 17 */ " loop pop\t\t\t% xs xe ys ye dx r y", /* 18 */ " 2 index add", /* 19 */ " }", /* 20 */ " loop\t\t\t\t\t% xs xe ys ye dx r y", /* 21 */ " pop pop pop pop pop pop pop", /* 22 */ "} bind def", NULL #line 782 "dk4grepp.ctr" }; /** Pattern procedure. */ static const char * const p21[] = { /* 0 */ "/VerticalTireTreads\t\t% xs xe ys ye dx", /* 1 */ "{", /* 2 */ " dup 0.5 mul\t\t\t% xs xe ys ye dx r", /* 3 */ " 5 index\t\t\t% xs xe ys ye dx r x", /* 4 */ " {", /* 5 */ " dup 6 index gt {exit} if", /* 6 */ " 4 index\t\t\t% xs xe ys ye dx r x y", /* 7 */ " {", /* 8 */ " dup 5 index gt {exit} if", /* 9 */ " 1 index 1 index 5 index add\t% xs xe ys ye dx r x y x2 y2", /* 10 */ " 3 index 5 index add\t\t% xs xe ys ye dx r x y x2 y2 x1", /* 11 */ " 3 index 6 index add\t\t% xs xe ys ye dx r x y x2 y2 x1 y1", /* 12 */ " 5 index 5 index\t\t\t% xs xe ys ye dx r x y x2 y2 x1 y1 x0 y0", /* 13 */ " newpath moveto lineto lineto\t% xs xe ys ye dx r x y", /* 14 */ " stroke", /* 15 */ " 3 index add", /* 16 */ " }", /* 17 */ " loop pop", /* 18 */ " 2 index add", /* 19 */ " }", /* 20 */ " loop\t\t\t\t% xs xe ys ye dx r x", /* 21 */ " pop pop pop pop pop pop pop", /* 22 */ "} bind def", NULL #line 814 "dk4grepp.ctr" }; /** Pattern names. */ static const char * const pnames[] = { /* 0 */ "ThirtyLeft", /* 1 */ "ThirtyRight", /* 2 */ "ThirtyHatch", /* 3 */ "FourtyFiveLeft", /* 4 */ "FourtyFiveRight", /* 5 */ "FourtyFiveHatch", /* 6 */ "HorizontalBricks", /* 7 */ "VerticalBricks", /* 8 */ "HorizontalLines", /* 9 */ "VerticalLines", /* 10 */ "CrossHatch", /* 11 */ "HorizontalShinglesLeft", /* 12 */ "HorizontalShinglesRight", /* 13 */ "VerticalShinglesLeft", /* 14 */ "VerticalShinglesRight", /* 15 */ "FishScales", /* 16 */ "SmallFishScales", /* 17 */ "Circles", /* 18 */ "Hexagons", /* 19 */ "Octagons", /* 20 */ "HorizontalTireTreads", /* 21 */ "VerticalTireTreads", NULL #line 845 "dk4grepp.ctr" }; /** Pattern procedures. */ static const char * const * pproc[] = { p00, p01, p02, p03, p04, p05, p06, p07, p08, p09, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21 }; const char * const * dk4gra_eps_pattern_procedure(size_t i) { const char * const *back = NULL; #if DK4_USE_ASSERT assert(DK4_GRA_PATTERN_MAX >= i); #endif if (DK4_GRA_PATTERN_MAX >= i) { back = pproc[i]; } return back; } const char * dk4gra_eps_pattern_name(size_t i) { const char *back = NULL; #if DK4_USE_ASSERT assert(DK4_GRA_PATTERN_MAX >= i); #endif if (DK4_GRA_PATTERN_MAX >= i) { back = pnames[i]; } return back; } /* vim: set ai sw=4 ts=4 : */