forked from processing/processing-library-template-ant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from drskullster/master
Pen speed control
- Loading branch information
Showing
5 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
bin | ||
tmp | ||
distribution | ||
*.iml | ||
.idea/ |
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,32 @@ | ||
import hpglgraphics.*; | ||
|
||
int lines = 30; | ||
|
||
void setup() { | ||
|
||
size(1104, 772); | ||
|
||
HPGLGraphics hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL); | ||
|
||
hpgl.setPaperSize("A4"); | ||
hpgl.setPath("output.hpgl"); | ||
|
||
background(255); | ||
stroke(0); | ||
fill(0); | ||
|
||
beginRecord(hpgl); | ||
|
||
// draw lines at incremental speed | ||
for(int i = 0; i < lines; i++) { | ||
hpgl.setSpeed(i); | ||
int y = height / lines * (i + 1); | ||
line(0, y, width, y); | ||
} | ||
|
||
endRecord(); | ||
|
||
} | ||
|
||
void draw() { | ||
} |
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
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
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