MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / psl_pattern_cleanup

Function psl_pattern_cleanup

src/postscriptlight.c:1707–1721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1705}
1706
1707static int psl_pattern_cleanup (struct PSL_CTRL *PSL) {
1708 int image_no, k = 0;
1709
1710 for (image_no = 0; image_no < PSL_N_PATTERNS * 2; image_no++)
1711 if (PSL->internal.pattern[image_no].status) k++;
1712 if (k == 0) return (PSL_NO_ERROR);
1713 PSL_comment (PSL, "Undefine patterns and images\n");
1714 for (image_no = 0; image_no < PSL_N_PATTERNS * 2; image_no++) {
1715 if (PSL->internal.pattern[image_no].status) {
1716 PSL_command (PSL, "currentdict /image%d undef\n", image_no+1);
1717 PSL_command (PSL, "currentdict /pattern%d undef\n", image_no+1);
1718 }
1719 }
1720 return (PSL_NO_ERROR);
1721}
1722
1723static int psl_patch (struct PSL_CTRL *PSL, double *x, double *y, int np) {
1724 /* Like PSL_plotpolygon but intended for small polygons (< 20 points). No checking for

Callers 1

PSL_endplotFunction · 0.85

Calls 2

PSL_commentFunction · 0.85
PSL_commandFunction · 0.85

Tested by

no test coverage detected