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

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20221 Thu Jan 14 08:00:17 MST 2010 patrick.corless PDF-131 updated bound resize and move calculations when moveing from page space to user space. Minimizes rounding erros that can occur.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/views/swing/AnnotationComponentImpl.java
        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Summary Annotation border shinks on resize do to rounding error Annotation border shinks on resize rounding error
        Salesforce Case []
        Fix Version/s 4.0 [ 10222 ]
        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.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: