ICEpdf
  1. ICEpdf
  2. PDF-131

Annotation border shinks on resize rounding error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0 - Beta
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      any

      Description

      No one has complained about this yet but there is a bug in the annotation JComponent in that a resized causes the border to shrink at zooms lower then 125%. The issue is likely related to the number rounding when moving betwen floats and ints and back again. I need to see if I can update the components getbounds to use a Rectangle2D.Float instead of a Rectangle.

        Activity

        Hide
        Patrick Corless added a comment -

        The annotationComponent code was doing a little extra math to dry and centre the border around the component bounds which I deemed unnecessary. I also update the the code so that we round the Recangle2D -> Rectangle values. There is an affine transform that can result in some 1 pixel draw issues if we don't round. Drawing still isn't perfect but is greatly improved. If more precision is needed the user can zoom in to a high zoom level to minimize any float -> int rounding errors.

        Show
        Patrick Corless added a comment - The annotationComponent code was doing a little extra math to dry and centre the border around the component bounds which I deemed unnecessary. I also update the the code so that we round the Recangle2D -> Rectangle values. There is an affine transform that can result in some 1 pixel draw issues if we don't round. Drawing still isn't perfect but is greatly improved. If more precision is needed the user can zoom in to a high zoom level to minimize any float -> int rounding errors.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: