Tabnine Logo
TextNode.swapTextPaintInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
swapTextPaintInfo
method
in
org.apache.batik.bridge.TextNode

Best Java code snippets using org.apache.batik.bridge.TextNode.swapTextPaintInfo (Showing top 6 results out of 315)

origin: org.apache.xmlgraphics/batik-bridge

/**
 * Adds painting attributes to an AttributedString.
 */
protected void addPaintAttributes(AttributedString as,
                 Element element,
                 TextNode node,
                 TextPaintInfo pi,
                 BridgeContext ctx) {
  // 'requiredFeatures', 'requiredExtensions' and 'systemLanguage'
  if ((!SVGUtilities.matchUserAgent(element, ctx.getUserAgent())) ||
    (!CSSUtilities.convertDisplay(element))) {
    return;
  }
  Object o = elemTPI.get(element);
  if (o != null) {
    node.swapTextPaintInfo(pi, (TextPaintInfo)o);
  }
  addChildPaintAttributes(as, element, node, pi, ctx);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Adds painting attributes to an AttributedString.
 */
protected void addPaintAttributes(AttributedString as,
                 Element element,
                 TextNode node,
                 TextPaintInfo pi,
                 BridgeContext ctx) {
  // 'requiredFeatures', 'requiredExtensions' and 'systemLanguage'
  if ((!SVGUtilities.matchUserAgent(element, ctx.getUserAgent())) ||
    (!CSSUtilities.convertDisplay(element))) {
    return;
  }
  Object o = elemTPI.get(element);
  if (o != null) {
    node.swapTextPaintInfo(pi, (TextPaintInfo)o);
  }
  addChildPaintAttributes(as, element, node, pi, ctx);
}
origin: apache/batik

/**
 * Adds painting attributes to an AttributedString.
 */
protected void addPaintAttributes(AttributedString as,
                 Element element,
                 TextNode node,
                 TextPaintInfo pi,
                 BridgeContext ctx) {
  // 'requiredFeatures', 'requiredExtensions' and 'systemLanguage'
  if ((!SVGUtilities.matchUserAgent(element, ctx.getUserAgent())) ||
    (!CSSUtilities.convertDisplay(element))) {
    return;
  }
  Object o = elemTPI.get(element);
  if (o != null) {
    node.swapTextPaintInfo(pi, (TextPaintInfo)o);
  }
  addChildPaintAttributes(as, element, node, pi, ctx);
}
origin: org.apache.xmlgraphics/batik-bridge

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());
}
origin: apache/batik

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());
}
origin: fr.avianey.apache-xmlgraphics/batik

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());
}
org.apache.batik.bridgeTextNodeswapTextPaintInfo

Popular methods of TextNode

  • getTextRuns
    Returns a list of text runs.
  • getAttributedCharacterIterator
    Returns the attributed character iterator of this text node.
  • getHighlightShape
    Returns the shape used to outline this text node.
  • getLocation
    Returns the location of this text node.
  • getMarkerForChar
    Return the marker for the character at index in this nodes AttributedCharacterIterator. Before Char
  • setTextPainter
    Sets the text painter of this text node. If the specified text painter is null, this text node will
  • setTextRuns
    Sets the list of text runs of this text node.
  • <init>
    Constructs a new empty TextNode.
  • contains
  • fireGraphicsNodeChangeCompleted
  • fireGraphicsNodeChangeStarted
  • getBounds
  • fireGraphicsNodeChangeStarted,
  • getBounds,
  • getGeometryBounds,
  • getGlobalTransform,
  • getPrimitiveBounds,
  • getRenderingHints,
  • getRoot,
  • getText,
  • invalidateGeometryCache,
  • setAttributedCharacterIterator

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now