Login  Register

Re: GLCanvas in awt scrollpane drawing problems

Posted by Mabula Haverkamp on Jun 11, 2018; 10:10am
URL: https://forum.jogamp.org/GLCanvas-in-awt-scrollpane-drawing-problems-tp4038912p4038926.html

Hi Julien,

Indeed, I am working on making a fake scroll pane. It's better for performance when you need to to zoom in on a very large image, which will happen in my application, because users can make huge mosaics.

This weekend I did find a miscalculation in my coordinate systems, and reflecting on this, I think it might caused my initial issues with the scrollpane.

I was zooming in with a factor of x and also had an xRatio, yRatio factor to keep the aspect ratio of the pixels fixed, these ratios were determined on the actual size of drawing the image relative to the scrollpane viewport. These xRatio and YRatio had the zoomfactor in them as well, so where I thought I was zooming in with factor x, I was actually zooming in with X^2 ;-(

So I think I messed up myself in the end...

I will not go back to the real scollpane setup, for performance reasons now, so in the end my error has pointed my in another direction with your help, which does deliver better performance in the end, so it's the better choice.

Thank you for you assistance ;-)

Kind regards,
Mabula