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

Function PSL_plotpolygon

src/postscriptlight.c:4837–4850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4835}
4836
4837int PSL_plotpolygon (struct PSL_CTRL *PSL, double *x, double *y, int n) {
4838 /* Draw and optionally fill polygons. If 20 or fewer points we use
4839 * the more expedited psl_patch function
4840 */
4841
4842 if (n <= 20)
4843 psl_patch (PSL, x, y, n); /* Small polygons can use the patch function */
4844 else {
4845 PSL_plotline (PSL, x, y, n, PSL_MOVE); /* No stroke or close path yet; see next line */
4846 PSL_command (PSL, "FO\n"); /* Close polygon and stroke/fill as set by PSL_setfill */
4847 }
4848
4849 return (PSL_NO_ERROR);
4850}
4851
4852int PSL_setexec (struct PSL_CTRL *PSL, int action) {
4853 /* Enables of disables the execution of a PSL_plot_completion function at start of a PSL_plotinit overlay */

Callers 15

gmtplot_northstarFunction · 0.85
gmtplot_draw_dir_roseFunction · 0.85
gmtplot_geo_polygonFunction · 0.85
gmt_plotcanvasFunction · 0.85
gmt_draw_frontFunction · 0.85
gmt_plot_grid_graticulesFunction · 0.85
gmt_two_curve_fillFunction · 0.85
pswiggle_plot_sectionFunction · 0.85
grdview_paint_itFunction · 0.85
GMT_grdviewFunction · 0.85

Calls 3

psl_patchFunction · 0.85
PSL_plotlineFunction · 0.85
PSL_commandFunction · 0.85

Tested by

no test coverage detected