Skip to content

Commit

Permalink
Some more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
emnullfuenf committed Feb 20, 2015
1 parent cfe6fa8 commit 140fa84
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 154 deletions.
144 changes: 0 additions & 144 deletions examples/Basic/data/scriptc.jhf

This file was deleted.

8 changes: 0 additions & 8 deletions examples/Basic/out.svg

This file was deleted.

2 changes: 0 additions & 2 deletions examples/Basic/sketch.properties

This file was deleted.

31 changes: 31 additions & 0 deletions examples/Export_SVG/Export_SVG.pde
@@ -0,0 +1,31 @@
import org.philhosoft.p8g.svg.P8gGraphicsSVG;
P8gGraphicsSVG svg;

HersheyFont hf;

void setup()
{
size(925, 500, P3D);
noLoop();
hf = new HersheyFont("futural.jhf");
hf.textSize(100);

svg = (P8gGraphicsSVG) createGraphics(width, height, P8gGraphicsSVG.SVG, "out.svg");
beginRecord(svg);
}

void draw()
{
g.background(255);

svg.clear(); // Discard previous frame
svg.beginDraw(); // And record this one

translate(100, height/3);
hf.text("HELLO", 0, 0);
translate(0, height/3);
shape(hf.getShape("PROCESSING"));
svg.endRecord();
}


0 comments on commit 140fa84

Please sign in to comment.