PDF-Export with multiple contour shape

Hi, I need some multiple contour shapes for Illustrator. The problem, if i create them with the methods beginContour() and endContour() in a Pshape and then export as Pdf, both contour are connected. Have anybody a answer for the Problem.

I also test it with geomerative library and then export as svg. But i don't know how create a own shape with the geomerative library.

Maybe there is a another solution to cut a shape out of another and make shapes with holes in them and export it for Illustrator?

I would be very grateful for every answer!

a little example of my problem:

PShape s;
import processing.pdf.*;

 void setup(){
  size(800, 800,P2D);
  s = createShape();

  s.beginShape();
  s.beginContour();
  s.vertex(0,0);
  s.vertex(200,0);
  s.vertex(200,200);
  s.vertex(0,200);
  s.vertex(0,0);
  s.endContour();

  // Interior part of shape
  s.beginContour();
  s.vertex(90,90);
  s.vertex(110,90);
  s.vertex(110,110);
  s.vertex(90,110);
  s.vertex(90,90);
  s.endContour();


  s.endShape();

}

void draw(){
  beginRecord(PDF, "test.pdf");
  shape(s,200,200);
  endRecord();
}

Answers

Sign In or Register to comment.