Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
xcode
xcode's Profile
1
Posts
0
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
Save in large size.
[3 Replies]
25-Aug-2010 04:11 AM
Forum:
Programming Questions
Hi,
When I try to save an image in large size.
the image moves to the left, and is not saved centered.
There any way to large-scale gusrdar pictures easily and without the image move?
code sample
PGraphics co;
void setup()
{
size(600,600,P3D);
co= createGraphics(3000,3000, P3D);
co.beginDraw();
co.background(0);
co.endDraw();
//drawShape();
}
void draw()
{
//background(mouseY,0,0);*/
//stroke(0,255,0);
//line(0,0,width,height);
image(context1,0,0);
}
void mousePressed() {
drawShape(mouseX, mouseY);
}
void drawShape(int x, int y){
co.beginDraw();
co.fill(255);
// co.noStroke();
co.stroke(200);
co.translate(x, y);
//co.rect(0, 0, 40, 40);
co.ellipse(0, 0, 100,100);
co.endDraw();
//output.background(255,0);
}
//**************
void keyPressed()
{
switch (key)
{
case '?':
//showHelp = !showHelp;
break;
case 's':
co.save("Snapshots/poll-####.png");
//saveFrame("Snapshots/poll-####.jpg");
break;
}
}
Thanks
«Prev
Next »
Moderate user : xcode
Forum