Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-414

TextNode.getBounds doesn't return correct boundary

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.5
    • None
    • GVT Text
    • None
    • Operating System: All
      Platform: All

    Description

      GVT TextNode bug

      This bug occur on SVGTSpanElement with dx & dy attrib without x & y attrib.
      The getBounds() from TextNode doesn't return the correct boundary, the boundary
      always
      start from 0,0 coord.

      Looking at the source the fix could be either in

      • Batik Bridge
        when setting the AttributedCharacterIterator on TextElement it calculate the x
        & y attrib for non existent x & y attrib
        or
      • Batik GVT
        when processing AttributedCharacterIterator, it calculate the x & y attrib for
        non existent x & y attrib

      work around
      instead of using gvtTextNode.getBounds(), use gvtTextNode.getOutline().getBounds()

      Attachments

        1. Bug23079.java
          3 kB
          Tonny
        2. bug_23079.svg
          0.7 kB
          Tonny

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            tonny@kiyut.com Tonny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: