MCPcopy Index your code
hub / github.com/MapServer/MapServer / msMoveLabelStyleDown

Function msMoveLabelStyleDown

maplabel.c:1094–1115  ·  view source on GitHub ↗

* Move the style down inside the array of styles. */

Source from the content-addressed store, hash-verified

1092 * Move the style down inside the array of styles.
1093 */
1094int msMoveLabelStyleDown(labelObj *label, int nStyleIndex)
1095{
1096 styleObj *psTmpStyle = NULL;
1097
1098 if (label && nStyleIndex < label->numstyles-1 && nStyleIndex >=0)
1099 {
1100 psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
1101 initStyle(psTmpStyle);
1102
1103 msCopyStyle(psTmpStyle, label->styles[nStyleIndex]);
1104
1105 msCopyStyle(label->styles[nStyleIndex],
1106 label->styles[nStyleIndex+1]);
1107
1108 msCopyStyle(label->styles[nStyleIndex+1], psTmpStyle);
1109
1110 return(MS_SUCCESS);
1111 }
1112 msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveLabelStyleDown()",
1113 nStyleIndex);
1114 return (MS_FAILURE);
1115}
1116
1117/**
1118 * Delete the style identified by the index and shift

Callers 1

labelObj_moveStyleDownFunction · 0.85

Calls 3

initStyleFunction · 0.85
msCopyStyleFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected