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

[PATCH] PdfGraphics2D incorrectly writes clipping instructions

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.95
    • Fix Version/s: None
    • Component/s: renderer/pdf
    • Labels:
      None
    • Environment:
      Operating System: Windows Vista
      Platform: PC
    • External issue ID:
      47031

      Description

      The current implementation of writeClip(Shape) of PDFGraphics2D checks whether the given clipping shape is empty. But if the shape has no points (i.e. shape.getPathIterator(...).isDone() returns true) there will only the instructions W n written to the pdf page content stream.
      The attached patch will fix this by checking if the PathIterator has at least one segment. If not, it will return without doing anything.

        Activity

        Hide
        f.fernandes@web.de Francois Fernandes added a comment -

        Attachment fop-pdfgraphics2d-writeClip.diff has been added with description: patch for PDFGraphics2D.writeClip(Shape)

        Show
        f.fernandes@web.de Francois Fernandes added a comment - Attachment fop-pdfgraphics2d-writeClip.diff has been added with description: patch for PDFGraphics2D.writeClip(Shape)
        Hide
        jeremias@apache.org Jeremias Maerki added a comment -

        Thanks for the patch, Francois. Committed: http://svn.apache.org/viewvc?rev=766596&view=rev

        Changes to your patch:

        • replaced tab character with spaces.
        Show
        jeremias@apache.org Jeremias Maerki added a comment - Thanks for the patch, Francois. Committed: http://svn.apache.org/viewvc?rev=766596&view=rev Changes to your patch: replaced tab character with spaces.
        Hide
        gadams Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        gadams Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev@xmlgraphics.apache.org fop-dev
            Reporter:
            f.fernandes@web.de Francois Fernandes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development