protected void rebuildACI() { if (hasNewACI) return; TextNode textNode = getTextNode(); if (textNode.getAttributedCharacterIterator() == null) return; TextPaintInfo pi, oldPI; if ( cssProceedElement == e ){ pi = new TextPaintInfo(); setBaseTextPaintInfo(pi, e, node, ctx); setDecorationTextPaintInfo(pi, e); oldPI = (TextPaintInfo)elemTPI.get(e); } else { //if a child CSS property has changed, then //retrieve the parent text decoration //and only update the section of the AtrtibutedString of //the child TextPaintInfo parentPI; parentPI = getParentTextPaintInfo(cssProceedElement); pi = getTextPaintInfo(cssProceedElement, textNode, parentPI, ctx); oldPI = (TextPaintInfo)elemTPI.get(cssProceedElement); } if (oldPI == null) return; textNode.swapTextPaintInfo(pi, oldPI); if (usingComplexSVGFont) // Force Complex SVG fonts to be recreated textNode.setAttributedCharacterIterator (textNode.getAttributedCharacterIterator()); }
protected void rebuildACI() { if (hasNewACI) return; TextNode textNode = getTextNode(); if (textNode.getAttributedCharacterIterator() == null) return; TextPaintInfo pi, oldPI; if ( cssProceedElement == e ){ pi = new TextPaintInfo(); setBaseTextPaintInfo(pi, e, node, ctx); setDecorationTextPaintInfo(pi, e); oldPI = (TextPaintInfo)elemTPI.get(e); } else { //if a child CSS property has changed, then //retrieve the parent text decoration //and only update the section of the AtrtibutedString of //the child TextPaintInfo parentPI; parentPI = getParentTextPaintInfo(cssProceedElement); pi = getTextPaintInfo(cssProceedElement, textNode, parentPI, ctx); oldPI = (TextPaintInfo)elemTPI.get(cssProceedElement); } if (oldPI == null) return; textNode.swapTextPaintInfo(pi, oldPI); if (usingComplexSVGFont) // Force Complex SVG fonts to be recreated textNode.setAttributedCharacterIterator (textNode.getAttributedCharacterIterator()); }
protected void rebuildACI() { if (hasNewACI) return; TextNode textNode = getTextNode(); if (textNode.getAttributedCharacterIterator() == null) return; TextPaintInfo pi, oldPI; if ( cssProceedElement == e ){ pi = new TextPaintInfo(); setBaseTextPaintInfo(pi, e, node, ctx); setDecorationTextPaintInfo(pi, e); oldPI = (TextPaintInfo)elemTPI.get(e); } else { //if a child CSS property has changed, then //retrieve the parent text decoration //and only update the section of the AtrtibutedString of //the child TextPaintInfo parentPI; parentPI = getParentTextPaintInfo(cssProceedElement); pi = getTextPaintInfo(cssProceedElement, textNode, parentPI, ctx); oldPI = (TextPaintInfo)elemTPI.get(cssProceedElement); } if (oldPI == null) return; textNode.swapTextPaintInfo(pi, oldPI); if (usingComplexSVGFont) // Force Complex SVG fonts to be recreated textNode.setAttributedCharacterIterator (textNode.getAttributedCharacterIterator()); }
/** * Constructs a TextDecoration object for the specified element. This will * contain all of the decoration properties to be used when drawing the * text. */ protected TextPaintInfo getTextPaintInfo(Element element, GraphicsNode node, TextPaintInfo parentTPI, BridgeContext ctx) { // Force the engine to update stuff.. CSSUtilities.getComputedStyle (element, SVGCSSEngine.TEXT_DECORATION_INDEX); TextPaintInfo pi = new TextPaintInfo(parentTPI); // Was text-decoration explicity set on this element? StyleMap sm = ((CSSStylableElement)element).getComputedStyleMap(null); if ((sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.FILL_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_WIDTH_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.OPACITY_INDEX))) { // If not, keep the same decorations. return pi; } setBaseTextPaintInfo(pi, element, node, ctx); if (!sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) setDecorationTextPaintInfo(pi, element); return pi; }
/** * Constructs a TextDecoration object for the specified element. This will * contain all of the decoration properties to be used when drawing the * text. */ protected TextPaintInfo getTextPaintInfo(Element element, GraphicsNode node, TextPaintInfo parentTPI, BridgeContext ctx) { // Force the engine to update stuff.. CSSUtilities.getComputedStyle (element, SVGCSSEngine.TEXT_DECORATION_INDEX); TextPaintInfo pi = new TextPaintInfo(parentTPI); // Was text-decoration explicity set on this element? StyleMap sm = ((CSSStylableElement)element).getComputedStyleMap(null); if ((sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.FILL_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_WIDTH_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.OPACITY_INDEX))) { // If not, keep the same decorations. return pi; } setBaseTextPaintInfo(pi, element, node, ctx); if (!sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) setDecorationTextPaintInfo(pi, element); return pi; }
/** * Constructs a TextDecoration object for the specified element. This will * contain all of the decoration properties to be used when drawing the * text. */ protected TextPaintInfo getTextPaintInfo(Element element, GraphicsNode node, TextPaintInfo parentTPI, BridgeContext ctx) { // Force the engine to update stuff.. CSSUtilities.getComputedStyle (element, SVGCSSEngine.TEXT_DECORATION_INDEX); TextPaintInfo pi = new TextPaintInfo(parentTPI); // Was text-decoration explicity set on this element? StyleMap sm = ((CSSStylableElement)element).getComputedStyleMap(null); if ((sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.FILL_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.STROKE_WIDTH_INDEX)) && (sm.isNullCascaded(SVGCSSEngine.OPACITY_INDEX))) { // If not, keep the same decorations. return pi; } setBaseTextPaintInfo(pi, element, node, ctx); if (!sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) setDecorationTextPaintInfo(pi, element); return pi; }
setBaseTextPaintInfo(pi, e, node, ctx);
setBaseTextPaintInfo(pi, e, node, ctx);
setBaseTextPaintInfo(pi, e, node, ctx);