New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curveVertex() behaves differently in FX2D compared with other renderers #4382

Closed
jwoLondon opened this Issue Apr 2, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@jwoLondon

jwoLondon commented Apr 2, 2016

In FX2D, a set of curveVertex() calls between beginShape() and endShape() result in a closed polygon when the line should be open.

Subsequent calls to a curveVertex() between a separate beginShape() - endShape() pair are joined to the previous shape. There appears to be no 'pen up' between calls to curveVertex().

Here's a minimal example:

void setup() {
  size(600, 400, FX2D);   // All lines joined.
  //size(600,400);        // Expected (documented) behaviour
}

void draw() {
  background(255);
  noFill();

  // First curved line
  beginShape();
   curveVertex(100, 10);
   curveVertex(100, 100);
   curveVertex(500, 100);
   curveVertex(500, 190);
  endShape();

  // Second curved line
  beginShape();
   curveVertex(100, 210);
   curveVertex(100, 300);
   curveVertex(500, 300);
   curveVertex(500, 390);
  endShape();  
}

(Tested on Processing 3.0.2, MacOSX 10 Yosemite, iMac retina)

@M4riko

This comment has been minimized.

Show comment
Hide comment
@M4riko

M4riko Jul 21, 2016

Same problem on Processing 3.1.1 on Windows.

A bit annoying since I try to implement a function Plotter, and he always closes the functions :)

M4riko commented Jul 21, 2016

Same problem on Processing 3.1.1 on Windows.

A bit annoying since I try to implement a function Plotter, and he always closes the functions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment