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.
IndexProgramming Questions & HelpSyntax Questions › How to hide the mouse cursor
Page Index Toggle Pages: 1
How to hide the mouse cursor? (Read 4069 times)
How to hide the mouse cursor?
Jan 11th, 2007, 5:42am
 
hi,

Im just trying out an example of Patterns from the processing sketchbook...

What I am after is to somehow hide the mouse cursor as it moves across on screen. Is this possible? As I am wanting to have project onto a wall and have an abstract way of controlling the mouse movement without actually seeing the mouse cursor.

I hope that makes sense?

The coding I have so far is:

/**
* Patterns.
*
* Move the cursor over the image to draw with a software tool
* which responds to the speed of the mouse.
*/

void setup()
{
 size(1280, 854);
 background(102);
 smooth();
}

void draw()
{
 // Call the variableEllipse() method and send it the
 // parameters for the current mouse position
 // and the previous mouse position
 variableRect(mouseX, mouseY, pmouseX, pmouseY);
}


// The simple method variableEllipse() was created specifically
// for this program. It calculates the speed of the mouse
// and draws a small ellipse if the mouse is moving slowly
// and draws a large ellipse if the mouse is moving quickly

void variableRect(int x, int y, int px, int py)
{
 float speed = abs(x-px) + abs(y-py);
 stroke(speed);
 rect(x, y, speed, speed);
}

Thanks in advance!

Jai
Re: How to hide the mouse cursor?
Reply #1 - Jan 11th, 2007, 11:14am
 
http://processing.org/reference/noCursor_.html should be all that you need.
Re: How to hide the mouse cursor?
Reply #2 - Jan 11th, 2007, 1:13pm
 
Thanks soooo much!
Page Index Toggle Pages: 1