* class extensions for styleObj, always within the context of a class **********************************************************************/
| 1391 | * class extensions for styleObj, always within the context of a class |
| 1392 | **********************************************************************/ |
| 1393 | styleObj *styleObj_new(classObj *class, styleObj *style) { |
| 1394 | if(msGrowClassStyles(class) == NULL) |
| 1395 | return NULL; |
| 1396 | |
| 1397 | if(initStyle(class->styles[class->numstyles]) == -1) |
| 1398 | return NULL; |
| 1399 | |
| 1400 | if (style) |
| 1401 | msCopyStyle(class->styles[class->numstyles], style); |
| 1402 | |
| 1403 | class->numstyles++; |
| 1404 | |
| 1405 | return class->styles[class->numstyles-1]; |
| 1406 | } |
| 1407 | |
| 1408 | styleObj *styleObj_label_new(labelObj *label, styleObj *style) { |
| 1409 | if(msGrowLabelStyles(label) == NULL) |
no test coverage detected