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

Function PSL_plotsegment

src/postscriptlight.c:4032–4042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4030}
4031
4032int PSL_plotsegment (struct PSL_CTRL *PSL, double x0, double y0, double x1, double y1) {
4033 /* Short line segment */
4034 int ix, iy;
4035
4036 ix = psl_ix (PSL, x0);
4037 iy = psl_iy (PSL, y0);
4038 PSL->internal.ix = psl_ix (PSL, x1);
4039 PSL->internal.iy = psl_iy (PSL, y1);
4040 PSL_command (PSL, "N %d %d M %d %d D S\n", ix, iy, PSL->internal.ix - ix, PSL->internal.iy - iy);
4041 return (PSL_NO_ERROR);
4042}
4043
4044int PSL_setcurrentpoint (struct PSL_CTRL *PSL, double x, double y) {
4045 /* Set the current point only */

Calls 3

psl_ixFunction · 0.85
psl_iyFunction · 0.85
PSL_commandFunction · 0.85

Tested by

no test coverage detected