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

Function gmtplot_prog_indicator_A

src/gmt_plot.c:8674–8700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8672/* Here are 6 (a-f) different progress indicator plotting functions. See the movie documentation for how they look */
8673
8674GMT_LOCAL void gmtplot_prog_indicator_A (struct GMT_CTRL *GMT, double x, double y, double t, double w, int justify, char *F1, char *F2) {
8675 /* Place default progress indicator pie */
8676 double dim[PSL_MAX_DIMS], fx, fy;
8677 struct GMT_FILL fill;
8678 gmt_M_memset (dim, PSL_MAX_DIMS, double);
8679 gmtplot_just_f_xy (justify, &fx, &fy);
8680 x += fx * w; y += fy * w; /* Move to center of circle */
8681 dim[0] = w;
8682 if (t < 1.0) { /* Need the background full circle since partly visible */
8683 gmt_getfill (GMT, F2, &fill); /* Want to paint background full circle*/
8684 PSL_setfill (GMT->PSL, fill.rgb, 0); /* Full circle color */
8685 PSL_plotsymbol (GMT->PSL, x, y, dim, PSL_CIRCLE); /* Plot full circle */
8686 }
8687 gmt_getfill (GMT, F1, &fill); /* Want to paint inside of tag box */
8688 PSL_setfill (GMT->PSL, fill.rgb, 0); /* Wedge color */
8689 if (doubleAlmostEqual (t, 1.0)) {
8690 PSL_plotsymbol (GMT->PSL, x, y, dim, PSL_CIRCLE); /* Plot full circle */
8691 }
8692 else {
8693 dim[0] = 0.5 * w; /* Apparently we take radius for wedge */
8694 dim[1] = 90.0 - 360 * t; /* Go clockwise. Convert t to 0-360 degrees */
8695 dim[2] = 90.0; /* Start is 12 'oclock */
8696 dim[7] = 1; /* Lay down filled wedge */
8697 PSL_command (GMT->PSL, "/PSL_spiderpen {} def\n"); /* So wedge won't fuss about not being set (like in psxy) */
8698 PSL_plotsymbol (GMT->PSL, x, y, dim, PSL_WEDGE); /* Plot wedge */
8699 }
8700}
8701
8702GMT_LOCAL void gmtplot_prog_indicator_B (struct GMT_CTRL *GMT, double x, double y, double t, double w, int justify, char *P1, char *P2, char *label, char kind, double fsize) {
8703 /* Place growing ring */

Callers 1

gmt_plotinitFunction · 0.85

Calls 5

gmtplot_just_f_xyFunction · 0.85
gmt_getfillFunction · 0.85
PSL_setfillFunction · 0.85
PSL_plotsymbolFunction · 0.85
PSL_commandFunction · 0.85

Tested by

no test coverage detected