blur after moveTo(newX, newY);
See original GitHub issueI use GYROSCOPE sensor to swipe & scroll pdfview,
bellow my pdfview init ` pdfView = (PDFView)activity.findViewById(resource_layout); pdfView.setLayerType(View.LAYER_TYPE_HARDWARE,null); pdfView.setDrawingCacheEnabled(true); pdfView.enableRenderDuringScale(false); pdfView.useBestQuality(true);
InputStream inStream = activity.getResources().openRawResource(resource_raw);
pdfView.fromStream(inStream)
.defaultPage(0)
.onPageChange(this)
.enableDoubletap(false)
.enableAnnotationRendering(true)
.onLoad(this)
.onPageScroll(this)
.scrollHandle(new DefaultScrollHandle(activity))
.load();
`
on loadcomplete I set zoom to 3
@Override public void loadComplete(int nbPages) { pdfView.zoomTo(3); }
when pdfview zoom to 3, it works well,
but when I scroll with sensor ` @Override public void onSensorChanged(SensorEvent event) { float valuey = event.values[0]; float valuex = event.values[1]; valuey = valuey * 50; valuex = valuex * 50;
smoothedX = smooth(valuex, smoothedX);
valuex = smoothedX;
smoothedY = smooth(valuey, smoothedY);
valuey = smoothedY;
float baseX = pdfView.getCurrentXOffset();
float baseY = pdfView.getCurrentYOffset();
if(abs(valuex)>3 || abs(valuey)>3){
baseY += valuey;
baseX -= valuex;
pdfView.moveTo(baseX, baseY);
}
}`
pdf move to point x & y correctly , but display is blur
please help…
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (5 by maintainers)
You may try using
pdfView.loadPages()
after.moveTo()
I just using
.loadPages()
method aftermoveTo
orzoomTo
. And after that all this small grids releases.