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

Function PSL_plotarc

src/postscriptlight.c:3676–3693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3674}
3675
3676int PSL_plotarc (struct PSL_CTRL *PSL, double x, double y, double radius, double az1, double az2, int type) {
3677 /* Plot an arc with radius running in azimuth from az1 to az2.
3678 * Type is a combination of the following:
3679 * PSL_DRAW (0) : Draw a line segment
3680 * PSL_MOVE (1) : Move to the new anchor point (x,y) first
3681 * PSL_STROKE (2) : Stroke the line
3682 */
3683 int ir;
3684
3685 if (fabs (az1 - az2) > 360.0) return (PSL_BAD_RANGE);
3686 if (radius < 0.0) return (PSL_BAD_SIZE);
3687 ir = psl_iz (PSL, radius);
3688 if (type & PSL_MOVE) PSL_command (PSL, "N ");
3689 PSL_command (PSL, "%d %d %d %.12g %.12g arc", psl_ix(PSL, x), psl_iy(PSL, y), ir, az1, az2);
3690 if (az1 > az2) PSL_command(PSL, "n");
3691 PSL_command (PSL, (type & PSL_STROKE) ? " S\n" : "\n");
3692 return (PSL_NO_ERROR);
3693}
3694
3695int PSL_plotaxis (struct PSL_CTRL *PSL, double annotation_int, char *label, double annotfontsize, int side) {
3696 /* Expects PSL_beginaxes to have been called first */

Callers 12

gmtplot_prog_indicator_BFunction · 0.85
gmt_draw_frontFunction · 0.85
psl_matharcFunction · 0.85
psl_vectorFunction · 0.85
psl_wedgeFunction · 0.85
PSL_plotarc_Function · 0.85
GMT_psroseFunction · 0.85

Calls 4

psl_izFunction · 0.85
PSL_commandFunction · 0.85
psl_ixFunction · 0.85
psl_iyFunction · 0.85

Tested by

no test coverage detected