Created
September 29, 2018 05:26
-
-
Save kylejohnston/1476a4d8055c9486cf3f04dc9fd4a6e6 to your computer and use it in GitHub Desktop.
Sublime snippet for generating PDFs from Processing + HYPE PDEs
This file contains hidden or 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
| <snippet><content><![CDATA[ | |
| // MOVE TO LINE 1 | |
| import processing.pdf.*; | |
| // PLACE BEFORE CLOSING BRACE IN VOID SETUP() | |
| saveVector(); | |
| noLoop(); | |
| } // CLOSE VOID SETUP() | |
| void draw() { | |
| H.drawStage(); | |
| } | |
| void saveVector() { | |
| PGraphics tmp = null; | |
| tmp = beginRecord(PDF, "#####.pdf"); | |
| if (tmp == null) { | |
| H.drawStage(); | |
| } else { | |
| H.stage().paintAll(tmp, false, 1); // PGraphics, uses3D, alpha | |
| } | |
| endRecord(); | |
| } | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>hype_pdf</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>source.pde</scope> | |
| </snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment