protected TextDecoration getTextDecoration(Element element,
GraphicsNode node,
TextDecoration parent,
BridgeContext ctx) {
int pidx = SVGCSSEngine.TEXT_DECORATION_INDEX;
Value val = CSSUtilities.getComputedStyle(element, pidx);
// Was text-decoration explicity set on this element?
StyleMap sm = ((CSSStylableElement)element).getComputedStyleMap(null);
if (sm.isNullCascaded(pidx)) {
// If not, keep the same decorations.
return parent;
}
TextDecoration textDecoration = new TextDecoration(parent);
short t = val.getCssValueType();
switch (val.getCssValueType()) {
case CSSValue.CSS_VALUE_LIST:
ListValue lst = (ListValue)val;
Paint paint = PaintServer.convertFillPaint(element, node, ctx);
Paint strokePaint = PaintServer.convertStrokePaint(element,
node, ctx);
Stroke stroke = PaintServer.convertStroke(element);
int len = lst.getLength();
for (int i = 0; i < len; i++) {
Value v = lst.item(i);
String s = v.getStringValue();
switch (s.charAt(0)) {
case 'u':
if (paint != null) {
textDecoration.underlinePaint = paint;
}