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

Use Marlin renderer in JavaFX BasicStroke

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • 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;
          }

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

              Created:
              Updated:
              Resolved: