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

java.awt.geom.Arc2D.contains: clarification needed

XMLWordPrintable

    • 2d
    • sparc
    • solaris_2.6



      Name: sdR10048 Date: 09/19/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b18"

      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      public boolean contains(double x,
                              double y)
      Determines whether or not the specified point is inside the boundary of the arc.

      Parameters:
      x - the specified x coordinate
      y - the specified y coordinate
      Returns:
      true if the point lies within the bound of the arc, false if the point lies outside of the arc's bounds.


      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      The spec for these methods:
        public boolean contains(double x, double y)
        public boolean contains(double x, double y, double w, double h)
        public boolean contains(Rectangle2D r)
      need explicit words about what the 'boundary of the arc" is?
      At least it should be stated that it is not the same with the boundary rectangle
      of arc. (If it is). Especially need more info about the boundary of an OPEN arc.

      ======================================================================

            avu Alexey Ushakov
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: