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

Function PSL_setdefaults

src/postscriptlight.c:5049–5066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5047}
5048
5049int PSL_setdefaults (struct PSL_CTRL *PSL, double xyscales[], double page_rgb[], char *encoding) {
5050 /* Changes the standard PSL defaults for:
5051 * xyscales: Global x- and y-scale magnifier [1.0, 1.0]
5052 * page_rgb: Page color [white = 1/1/1]; give NULL to leave unchanged.
5053 *
5054 * Only non-zero values will result in a change */
5055
5056 if (xyscales[0] != 0.0) PSL->init.magnify[0] = xyscales[0]; /* Change plot x magnifier */
5057 if (xyscales[1] != 0.0) PSL->init.magnify[1] = xyscales[1]; /* Change plot y magnifier */
5058 if (page_rgb) PSL_rgb_copy (PSL->init.page_rgb, page_rgb); /* Change media color */
5059 if (PSL->init.encoding && encoding && strcmp (PSL->init.encoding, encoding)) {
5060 PSL_free (PSL->init.encoding);
5061 PSL->init.encoding = strdup (encoding);
5062 }
5063 else if (!PSL->init.encoding)
5064 PSL->init.encoding = (encoding) ? strdup (encoding) : strdup ("Standard");
5065 return (PSL_NO_ERROR);
5066}
5067
5068int PSL_plottextbox (struct PSL_CTRL *PSL, double x, double y, double fontsize, char *text, double angle, int justify, double offset[], int mode) {
5069 /* Plot a box to be later filled with text. The box is

Callers 3

gmt_plotinitFunction · 0.85
PSL_setdefaults_Function · 0.85
gmt_beginFunction · 0.85

Calls 1

strdupFunction · 0.85

Tested by

no test coverage detected