Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3991

PDPageContentStream has sometimes float, sometimes double parameters

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      None

      Description

      From Dave Patterson in the users mailing list:

      I was crawling through this class over the weekend and saw something that
      seemed strange. I'm not sure if it is a bug or not.

      There is a version of the setStrokingColor (line 1112 in the 2.0.7
      codebase) with four parameters, all float: c, m, y, k. The values are used
      for calls to writeOperand without any conversion.

      There is a version of the setNonStrokingColor (line 1302 in the 2.0.7
      codebase) with four parameters, all double: c, m, y, k. The values are used
      for calls to writeOperand, but each is coerced to be a float.

      Should the parameter signature on the setNonStrokingColor be changed to
      require floats?

      I am not using these calls, but saw them and they struck me as odd.

      I'll change these to float and deprecate the existing.

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: