* Move the style down inside the array of styles. */
| 1092 | * Move the style down inside the array of styles. |
| 1093 | */ |
| 1094 | int 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 |
no test coverage detected