We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › print, download pdf
Page Index Toggle Pages: 1
print, download pdf (Read 670 times)
print, download pdf
Jan 8th, 2010, 2:53am
 
Hi I'm a processing newbie and currently playing around with some ideas whilst learning how to use variables. Can anybody tell me how you would add a download pdf or print function like the one you get on an online instruction manual?

The following example was taken from the motion/springy drawer pde.

cheers

import seltar.motion.*;
Motion mf, m;

void setup()
{
 size(1024,768);
 mf = new Motion(width/2,height/2);
 mf.setConstant(100);
 m = new Motion(width/2,height/2);
 m.setConstant(1000);
 background(255);
 smooth();
}

void draw()
{
 if(keyPressed) background(0);
 strokeWeight(mf.getDistance());
 mf.followTo(mouseX,mouseY);
 mf.move();
 
 m.springTo(mf.getX(),mf.getY());
 m.move();
 
 if(mousePressed){
   stroke(25);
   line(mf.getX(), mf.getY(), m.getX(),m.getY());
   fill(65);
   stroke(255);
   ellipse(m.getX(),m.getY(),m.getDistance(),m.getDistance());
 }
}
Re: print, download pdf
Reply #1 - Jan 8th, 2010, 1:14pm
 
Please, Exhibition isn't the place to ask questions.

Anyway, look at the Library page, search for postToWeb.
Page Index Toggle Pages: 1