MCPcopy Create free account
hub / github.com/MapServer/MapServer / msMoveLabelStyleUp

Function msMoveLabelStyleUp

maplabel.c:1068–1088  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1066 * Move the style up inside the array of styles.
1067 */
1068int msMoveLabelStyleUp(labelObj *label, int nStyleIndex)
1069{
1070 styleObj *psTmpStyle = NULL;
1071 if (label && nStyleIndex < label->numstyles && nStyleIndex >0)
1072 {
1073 psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
1074 initStyle(psTmpStyle);
1075
1076 msCopyStyle(psTmpStyle, label->styles[nStyleIndex]);
1077
1078 msCopyStyle(label->styles[nStyleIndex],
1079 label->styles[nStyleIndex-1]);
1080
1081 msCopyStyle(label->styles[nStyleIndex-1], psTmpStyle);
1082
1083 return(MS_SUCCESS);
1084 }
1085 msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveLabelStyleUp()",
1086 nStyleIndex);
1087 return (MS_FAILURE);
1088}
1089
1090
1091/**

Callers 1

labelObj_moveStyleUpFunction · 0.85

Calls 3

initStyleFunction · 0.85
msCopyStyleFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected