I'm trying to implement double-tap zoom using PDFLayoutView/PDFLayout. My code is as follows:
float zoom = layout.vGetZoom();
if (++zoom >= 5) {
zoom = 1.f;
}
PDFLayout.PDFPos pdfPos = layout.vGetPos((int) x, (int) y);
layout.vZoomSet((int) x, (int) y, pdfPos, zoom);
The zoom level is set correctly. The problem is that the document zooms to completely arbitrary places, most of the times even to different pages. I'm using the latest library version 3.6.2b.
The x and y values are from the touch event.