touch_getCursor()

Example

POINT point;

void setup(){
fill(255);
}

void loop(){
if(touch_getCursor(&point)) {
ellipse(point.x, point.y, 20,20); //draws an ellipse at the touch
}
}


Description

When called, touch_getCursor will update the point.x and point.y data of the last touch. touch_getCursor will only update the point if the screen has been touched since the last time it was called.

Syntax


char touch_getCursor(POINT * p)


Parameters

POINT * p – Storage for the x and y mouse coordinate.

Returns

0 – The screen was NOT touched.
1 – The screen was touched

Related

gettouch()
mouseX
mouseY




Edit History