Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2678

[PATCH] FOPGVTGlyphVector.getGlyphOutline returns just glyph bounding box

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5
    • None
    • None
    • None

    Description

      The following method returns just glyph bounding box, not a glyph shape:

          public Shape getGlyphOutline(int glyphIndex) {
              Shape glyphBox = getBoundingBoxes()[glyphIndex];
              AffineTransform tr = AffineTransform.getTranslateInstance(positions[glyphIndex * 2],
                      positions[glyphIndex * 2 + 1]);
              AffineTransform glyphTransform = getGlyphTransform(glyphIndex);
              if (glyphTransform != null) {
                  tr.concatenate(glyphTransform);
              }
              return tr.createTransformedShape(glyphBox);
          }
      

      This convenient method hence cannot be used properly to address e.g.
      https://issues.apache.org/jira/browse/FOP-2677

      Attachments

        1. FOP-2678-2.patch
          5 kB
          Eric Lim
        2. diagram.svg
          10 kB
          Eric Lim
        3. FOP-2678-tests.patch
          4 kB
          Jan Tošovský
        4. FOP-2678.patch
          3 kB
          Jan Tošovský

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jan.tosovsky.cz Jan Tošovský
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: