Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5104251

java.awt.geom.AffineTransform.getDeterminant, don't say the value IS not useful

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      solaris_2.5.1

      Description



      Name: js151677 Date: 09/20/2004


      A DESCRIPTION OF THE PROBLEM :
      The doc says :

      If this transform represents a non-uniform scale or more general transform then the determinant is not likely to represent a value useful for any purpose other than determining if inverse transforms are possible.

      However the value of the determinant IS useful. In fact it represents the scale factor by which an area is transformed, with a minus sign if orientation is reversed. This is true regardless of the shape (as simple as a square or as complex as you want).

      This is a way to explain why a null determinant occurs only in singular transforms, it means that shapes that does have a positive area before the transform are collapsed along a line segment (or worse, collapsed into a point) by the transform and have a null area after the transform.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Something like :

      The value of the determinant is the signed scale factor by which area are transformed (hence null determinant transform collapse regular shapes into degenerated null area line segments or single points). The sign shows if orientation is preserved or not. If a shape with area A is transformed, the area of the transformed shape will be

        Math.abs(A * transform.getDeterminant())
      ACTUAL -
      If this transform represents a non-uniform scale or more general transform then the determinant is not likely to represent a value useful for any purpose other than determining if inverse transforms are possible.

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/java/awt/geom/AffineTransform.html#getDeterminant()
      (Incident Review ID: 311213)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jssunw Jitender S (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: