Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
elomskine
elomskine's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Saving in high resolution URGENT help!
[5 Replies]
18-Mar-2013 08:06 PM
Forum:
Contributed Library Questions
Hello, fellow forum mates, I'm not sure if i'm doing this the right way.. please help.
I managed to save the file but it's in really low (pixelated) tiff file.
I need to save it in high resolution tiff or pdf file for print!
Here's the code:
import processing.pdf.*;
import geomerative.*;
RFont myFont;
RGroup myGroup;
RPoint[] myPoints;
String myText = "A";
float angle;
FontAgent[] myAgents;
int step = 7;
PGraphics big;
void setup() {
size(600, 300);
background(255);
smooth();
big = createGraphics ( 3000, 3000, JAVA2D );
RG.init(this);
myFont = new RFont("FreeSans.ttf", 150, CENTER);
RCommand.setSegmentLength(7);
RCommand.setSegmentator(RCommand.UNIFORMLENGTH);
myGroup = myFont.toGroup(myText);
myPoints = myGroup.getPoints();
myAgents = new FontAgent[myPoints.length];
for (int i=0; i<myPoints.length; i++) {
myAgents[i] = new FontAgent(new PVector(myPoints[i].x, myPoints[i].y));
}
}
void draw() {
translate(290, 200);
big.background(0);
for (int i = 0; i < myPoints.length; i++) {
myAgents[i].display();
strokeWeight(1);
}
}
class FontAgent {
PVector loc;
FontAgent(PVector l) {
loc = l.get();
}
void display() {
big.stroke(0);
float fix = 30;
//float len = map(mouseY,0,height,0,100);
float len = map (fix, 0, height, 0, 100);
pushMatrix();
translate(loc.x, loc.y);
big.rotate(map(mouseY, 100, width, 0, TWO_PI));
//rotate(map(mouseY, 0, width, 0, TWO_PI));
big.line(-len, -len, len, len);
popMatrix();
big.endDraw ();
big.save ( "type-######.tiff");
}
}
«Prev
Next »
Moderate user : elomskine
Forum