}
if (circle.isRadiusDirty()) {
setAttribute(element, "r", circle.getRadius());
}
} else if (sprite instanceof EllipseSprite) {
EllipseSprite ellipse = (EllipseSprite) sprite;
if (ellipse.isCenterXDirty()) {
setAttribute(element, "cx", ellipse.getCenterX());
}
if (ellipse.isCenterYDirty()) {
setAttribute(element, "cy", ellipse.getCenterY());
}
if (ellipse.isRadiusXDirty()) {
setAttribute(element, "rx", ellipse.getRadiusX());
}
if (ellipse.isRadiusYDirty()) {
setAttribute(element, "ry", ellipse.getRadiusY());
}
} else if (sprite instanceof ImageSprite) {
ImageSprite image = (ImageSprite) sprite;
if (image.isResourceDirty() && image.getResource() != null) {
element.setAttributeNS("http://www.w3.org/1999/xlink", "href", image.getResource().getSafeUri().asString());