forked from processing/processing-library-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfe6fa8
commit 140fa84
Showing
4 changed files
with
31 additions
and
154 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
|
||
|