We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've been working on integrating some of my existing Processing sketches with Android, and I have been making use of the Ketai library which has been very helpful so far. However, I have been unable to get the onPinch() function to execute. To test it, I wrote a pinch sketch which is also not working.
import ketai.ui.*;
float ellipseWidth = 50;
float ellipseHeight = 50;
KetaiGesture gesture;
void setup() {
size(displayWidth, displayHeight);
println("println works fine");
KetaiAlertDialog.popup(this, "Test", "Other parts of Ketai work fine.");
}
void draw() {
orientation(PORTRAIT);
background(0);
fill(0);
stroke(255);
ellipse(width/2, height/2, ellipseWidth, ellipseHeight);
}
void onPinch (float x, float y, float d) {
println("Pinched");
ellipseWidth += d;
ellipseHeight += d;
}
I cannot find anything useful about this in the documentation (here) and I have done essentially the same thing that worked here so all that can still be wrong is related to my configuration unless I have missed something obvious.
Answers
The problem persists across any programs I try to make using those Ketai functions.
That should do the trick! ;)