Get Anchor Point of SVG

edited October 2016 in Library Questions

Hi!

I'm trying to get all the anchor points from a loaded svg. I tried to do it with geomerative, but i only figured out how to get the anchor points AND the handles. Thats what i got so far:

import geomerative.*;
RShape shp;

void setup() {
  size(600, 600);
  RG.init(this);

  shp = RG.loadShape("b.svg");
}

void draw() {
  background(255);
  translate(width/2, height/2);
  RPoint[] handles = shp.getHandles();
  for (int i = 0; i< handles.length; i++) {
    ellipse(handles[i].x, handles[i].y, 10, 10);
  }
}

this is how the output looks: output_reality

this is what i want: output_wish

here's the svg i'm using: http://pastebin.com/UEBZPtZt

how can i filter out all the handles?

Tagged:
Sign In or Register to comment.