case "apply":
String[] tokens = child.getTextContent().split(" ");
FeatureDescriptor fd = FeatureDescriptor.valueOf(tokens[0], root.getAttribute("feature"), tokens[1]);
AffineTransform af = getTransform();
if (baseLocation != null) {
Rotation rotate = fd.getLocation().getRotationOf(baseLocation);
af.concatenate(rotate.getAffineTransform(ResourcePlugin.NORMALIZED_SIZE));
}
handler.processApply(child, fd, af);
if (XmlUtils.attributeBoolValue(child, "allRotations")) {
Rotation rot = Rotation.R90;
for (int ri = 0; ri < 3; ri++) {
Location rotatedLoc = fd.getLocation().rotateCW(rot);
FeatureDescriptor rotatedFd = new FeatureDescriptor(fd.getTileId(), fd.getFeatureType(), rotatedLoc);
af.concatenate(Rotation.R90.getAffineTransform(ResourcePlugin.NORMALIZED_SIZE));
handler.processApply(child, rotatedFd, af);
rot = rot.next();
}
}
break;
case "substract":
assert baseLocation == null : "baseLocation is not allowed together with substraction element";