pointer_dragged_x and pointer_dragged_y may return with very-very old values.
example: if you dragged and released the pointer and then you are only clicking somewhere on the screen the dragging coordinates remains unchanged, so if you try to drag the pointer again these functions will first give the old coordinates of the previous dragging. this way drawing a line from the start of actual dragging to the end of actual dragging will start from false coordinates.
I suggest a patch for Lib_sensor.java:
protected void pointerPressed(int i, int j)
{
PX = i;
PY = j;
DX = i;
DY = j;
pressed = 1;
}
TESTED, and works right for me...