| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### cursor()
Examples |  |
    // Move the mouse left and right across the image
    // to see the cursor change from a cross to a hand

    void loop()
    {
      if(mouseX < 50) {
        cursor(CROSS);
      } else {
        cursor(HAND);
      }
    }
Description |  | Sets the cursor to a predefined symbol, an image, or turns it on if already hidden. If you are trying to set an image as the cursor, it is recommended to make the size 16x16 or 32x32 pixels. It is not possible to load an image as the cursor if you are exporting your program for the Web. The values for parameters x and y must be less than the dimensions of the image.
Syntax |  |
    cursor()
    cursor(MODE)
    cursor(image, x, y)
Parameters |  |
MODE |  | either ARROW, CROSS, HAND, MOVE, TEXT, WAIT
image |  | BImage: any variable of type BImage
x |  | int: the horizonal active spot of the cursor
y |  | int: the vertical active spot of the cursor
Returns |  | None
Usage |  | Web & Application
Related |  | noCursor()

| © 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |