Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How can I create a vector shape from a line in Geomerative?

$
0
0

Hi,

I was wondering how I can create a vector shape (a closed path) from a line (which is an imported SVG file) with the Geomerative library. So I want to import the SVG file, then adjust the line thickness and then convert it to a shape.

I hope you can help me!

Here's the code I was using so far and the link to my SVG file.

import geomerative.*;

RShape shp;

void setup(){
  size(800, 600);
  smooth();

  RG.init(this);

  shp = RG.loadShape("e-02.svg");
  shp = RG.centerIn(shp, g);
}

void draw(){
  translate(400,300);
  background(255);
  RG.shape(shp);
  stroke(0);
  strokeWeight(10);
  RG.ignoreStyles();

}

https://dl.dropboxusercontent.com/u/104619472/e-02.svg


Viewing all articles
Browse latest Browse all 2896

Trending Articles