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

Let me turn off BasicStroke's (0.5, 0.5) offset

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      1.3
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: gsC80088 Date: 02/10/99


      According to the javadoc for Graphics2D, "the BasicStroke object always applies a (0.5, 0.5) user space translation to its pen before stroking a path." I would like a easy way to turn off this translation, preferably with a parameter on BasicStroke's constructor.

      I understand your desire to make BasicStroke behave the same as JDK 1.1 did for 1-pixel lines. However, this behavior is undesirable when trying to stroke a filled Shape. Ideally, the stroke should be centered exactly on the edge of the filled Shape, not offset by (0.5, 0.5).
      (Review ID: 54031)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            flar Jim Graham
            Reporter:
            gstone Greg Stone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: