Fork me on GitHub


SVGExtended


Extension of SVG support in Processing.

 

Text support: it is possible to display text from svg images. .

Embedded and linked images: svg files can contain rasterized images (jpeg, png), they are displayed now.

Simple extension: this library is a simple extension of the PShapeSVG class from vanilla Processing.

SVGExtended

This library is developped for Soby, and PapARt.

How to use ?

Instead of creating a PShapeSVG from an XML, use a PShapeSVGExtended.

import tech.lity.rea.svgextended.*;

PShape bot1, bot2;
void setup() {
  size(640, 660);
  // The file "bot1.svg" must be in the data folder
  // of the current sketch to load successfully
  bot1 = loadShape("bot2.svg");

  // The file "bot2.svg" must be located with "bot1.svg"
  bot2 = new PShapeSVGExtended(loadXML("bot2.svg"));
} 

void draw(){
  background(102);
  shape(bot1, 0, 0); 
  shape(bot2, 0, 320);
}

How to install ?

The library already compiled, see the release page.