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

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

XMLWordPrintable

    • 2d
    • 1.3
    • x86
    • windows_nt



      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: