Tobiaszimmer (talk | contribs) No edit summary |
Tobiaszimmer (talk | contribs) No edit summary |
||
Line 48: | Line 48: | ||
'''How to use the library for HPGL export in a Processing sketch?'''<br> | '''How to use the library for HPGL export in a Processing sketch?'''<br> | ||
import hpglgraphics.*; | |||
HPGLGraphics hpgl; | |||
void setup(){ | |||
size(1104, 772); // 1616 x 1104 for A3(!?) | |||
Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL); | |||
hpgl.setPaperSize("A4"); //either A4 or A3 | |||
hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder | |||
noLoop(); | |||
} | } | ||
void draw(){ | void draw(){ | ||
beginRecord(hpgl); | |||
// your code here (the graphics you wnat to export as hpgl file) | |||
endRecord(); | |||
} | } | ||
'''How to send a HPGL file to the plotter?'''<br> | '''How to send a HPGL file to the plotter?'''<br> | ||
Use the “HP7475A_feed_hpgl_file_01” or “HP7475A_feed_hpgl_file_02” sketches, which are almost the same (only the buffer handling works differently). Both do not work perfect yet for each case, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments | Use the “HP7475A_feed_hpgl_file_01” or “HP7475A_feed_hpgl_file_02” sketches, which are almost the same (only the buffer handling works differently). Both do not work perfect yet for each case, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments |