String ref = trg.ref;
SVGElement element = locateDef(ref, trg);
if (element instanceof SVGTextElementImpl) {
// GraphicImpl parent = graph.getGraphicParent();
// graph.setParent(trg);
SVGTextElementImpl tele =
(SVGTextElementImpl) element;
// the style should be from tele, but it needs to be placed as a child
// of trg to work
di = applyStyle(trg, trg);
if (di.fill) {
if (di.stroke) {
currentStream.write("2 Tr\n");
} else {
currentStream.write("0 Tr\n");
}
} else if (di.stroke) {
currentStream.write("1 Tr\n");
}
boolean changed = false;
FontState oldfs = fs;
changed = updateFont(te, fs);
NodeList nl = tele.getChildNodes();
boolean spacing =
"preserve".equals(trg.getXMLspace());
renderTextNodes(spacing, nl,
trg.getX().getBaseVal(),
trg.getY().getBaseVal(),