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

Function gmt_setfill

src/gmt_plot.c:6930–6946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6928}
6929
6930void gmt_setfill (struct GMT_CTRL *GMT, struct GMT_FILL *fill, int outline) {
6931 struct PSL_CTRL *PSL= GMT->PSL;
6932 if (!fill) /* NO fill pointer = no fill */
6933 PSL_setfill (PSL, GMT->session.no_rgb, outline);
6934 else if (fill->use_pattern) {
6935 /* Fill with a pattern */
6936 double rgb[4] = {-3.0, -3.0, -3.0, 0.0};
6937 rgb[1] = (double)PSL_setimage (PSL, fill->pattern_no, fill->pattern, fill->image, fill->dpi, fill->dim, fill->f_rgb, fill->b_rgb);
6938 if (rgb[1] < 0.0) { /* Error in PSL_setimage */
6939 gmt_M_memset (rgb, 4, double);
6940 PSL_comment (GMT->PSL, "PSL_setimage failed: Setting fill to black\n");
6941 }
6942 PSL_setfill (PSL, rgb, outline);
6943 }
6944 else /* Fill with a color */
6945 PSL_setfill (PSL, fill->rgb, outline);
6946}
6947
6948unsigned int gmt_setfont (struct GMT_CTRL *GMT, struct GMT_FONT *F) {
6949 /* Set all attributes of the selected font in the PS */

Callers 15

gmtplot_draw_mag_roseFunction · 0.85
gmtplot_draw_dir_roseFunction · 0.85
gmt_xy_axisFunction · 0.85
gmt_setfontFunction · 0.85
gmt_draw_map_insetFunction · 0.85
gmt_draw_map_panelFunction · 0.85
gmt_draw_custom_symbolFunction · 0.85
gmt_plotcanvasFunction · 0.85
gmt_plot_grid_graticulesFunction · 0.85
gmt_two_curve_fillFunction · 0.85
pswiggle_plot_sectionFunction · 0.85

Calls 3

PSL_setfillFunction · 0.85
PSL_setimageFunction · 0.85
PSL_commentFunction · 0.85

Tested by

no test coverage detected