# The function "noCursor()" does not exist

**URL:** <https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618>\
**Category:** Processing for Android\
**Created:** [March 12, 2020, 8:41am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618 "2020-03-12T08:41:01Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [May 12, 2020, 7:50pm UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/8 "2020-05-12T19:50:49Z")

</div>

If anyone want to realize cursor like function in your application, you can code like :

```auto
int oldMouseX=0;
int oldMouseY=0;
color oldCorlor;
color colorCursor= color(255,0,0);
color colorCursorTrajectory=color(255,0,255);

boolean bEnableCursorTrajectory=false;//You can set that value to be true, if you want to show cursor trajectory
int CursorSize=10;

void draw() {
  fill(oldCorlor);
  noStroke();
  ellipse(oldMouseX,oldMouseY,CursorSize,CursorSize);
  
  if (bEnableCursorTrajectory){
    stroke(colorCursorTrajectory);
    if (mousePressed == true) {
      strokeWeight(CursorSize);
      strokeCap(ROUND);
      line(mouseX, mouseY, pmouseX, pmouseY); 
    } 
  }
  /**/
  
  //your code here
  
  /**/
  if (mousePressed == true) {
    oldMouseX=mouseX;
    oldMouseY=mouseY;
    oldCorlor=get(oldMouseX,oldMouseY);
    noStroke();
    fill(colorCursor);
    ellipse(mouseX,mouseY,CursorSize,CursorSize); 
  }

}

```

---

_[View the full topic](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618)._
