Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
michelwenzer
michelwenzer's Profile
2
Posts
5
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
beginners question#2: mouse position
[4 Replies]
11-Nov-2010 12:32 PM
Forum:
Programming Questions
Hi all.
I'm looking for a function that will give me the X-Y coordinates of the mouse position in the console.
Michel
Beginners question: toggle between stroke/noStroke
[6 Replies]
11-Nov-2010 02:35 AM
Forum:
Programming Questions
I've just started learning processing with Reas & Fry's book and wonder if someone could help me with a little problem?
I've tried to modify example 2-2 in the book "make circles".
I've tried to add key commands for: erase screen, stop, and draw .
I've tried to toggle between stroke/noStroke to create a "eraser".
My key commands works quite good but I wonder how to erase/draw background while in stop mode?
My other question is why I don't get strokeWeight(1); when releasing the mouse?
Thanks!
Michel
void setup() {
size(screen.width,screen.height);
background(80);
smooth();
loop();
noLoop();
}
void draw() {
if (mousePressed) {
noStroke();
fill(80);
} else {
strokeWeight(1);
fill(190);
}
ellipse(mouseX, mouseY, 40, 40);
}
void drawBackground() {
size(screen.width,screen.height);
background(80);
}
void keyPressed() {
if(key== 'e') drawBackground();
if(key== 's') noLoop();
if(key== 'd') loop();
}
«Prev
Next »
Moderate user : michelwenzer
Forum