Use Marlin renderer in JavaFX BasicStroke

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 10
    • Affects Version/s: 10
    • Component/s: javafx
    • None

      Fix BasicStroke.createCenteredStrokedShape() to use the Marlin renderer instead of Java Pisces renderer (and its Dasher / Stroker operations):

      import com.sun.openpisces.Dasher;
      import com.sun.openpisces.Stroker;
      import com.sun.prism.impl.shape.OpenPiscesPrismUtils;

      ...

          public Shape createCenteredStrokedShape(Shape s) {
              Path2D p2d = new Path2D(Path2D.WIND_NON_ZERO);
              float lw = (type == TYPE_CENTERED) ? width : width * 2.0f;
              PathConsumer2D pc2d =
                  new Stroker(p2d, lw, cap, join, miterLimit);
              if (dash != null) {
                  pc2d = new Dasher(pc2d, dash, dashPhase);
              }
              OpenPiscesPrismUtils.feedConsumer(s.getPathIterator(null), pc2d);
              return p2d;
          }

            Assignee:
            Laurent Bourgès
            Reporter:
            Laurent Bourgès
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: