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

[PATCH] PdfGraphics2D incorrectly writes clipping instructions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.95
    • None
    • renderer/pdf
    • None
    • Operating System: Windows Vista
      Platform: PC
    • 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.

      Attachments

        1. fop-pdfgraphics2d-writeClip.diff
          0.7 kB
          Francois Fernandes

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: