Am trying to implement to “Fit to Width/Height/Page” functionalities in my project.The view has some graph objects basically looks like a table.I get the size of the canvas area overriding getVisibleRect() and also getExtentSize().I calculate their width and I set the scale.But the view looks weird.It resizes the object but the position is also changed.I want it to be placed in 0,0 coords.Can you plz tell me how to resolve?


That’s odd. If you just call setScale on the JGoView it should keep the same point in the document in the upper left corner of the view. Take a look at the zooming operations in the Demo1 sample application (implemented in the Demo1.zoomInAction() and Demo1.zoomOutAction(). They seem to work correctly for me.