static int scrollPreview(int mode, int ox, int oy)
Always returns 1.
Scrolls the preview image (the part of the image displayed in the preview window) into the new position. Scrolling can be relative to current position or absolute.
This function only work if the image is larger than the preview. If the image is fully displayed in the preview, this function has no effect.
Warning: Only use scrollPreview() in the OnCtl and OnFilterStart handlers, otherwise you will get some unwanted effects in the preview! Calling it several times in a loop also causes redraw problems. But if works fine if only used for moving the image in the preview to a certain position, if followed by doAction(CA_PREVIEW).
scrollPreview(0, 100, 100) - scroll the preview image 100 pixels down and to the right
scrollPreview(0, -100, -100) - scroll the preview image 100 pixels up and to the left
scrollPreview(1, 0, 0) - display the top left corner of the image in the preview
scrollPreview(1, 200, 200) - center the preview image at the coordinate (200,200)
scrollPreview(1, X/2, Y/2) - display the center of the image in the preview
Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.