How do you reset the bounds when scaling a Matrix object
-
Hi, I'm using Visual Studio 2005 C++/CLI. I have setup a zoom function that uses a Matrix class. Changing the Scale of the matrix will cause the image on the screen to zoom in or zoom out. On the zoom in function the upper left corner of the screen (0,0) is anchored so it appears that you are zooming in on the upper left corner. I can't seem to find the correct way to change the bounds of the screen because all of the Screen class properties seem to be read only. Is a screen class the right approach? Ideally I want the zoom functions to zoom relative to where the mouse is clicked on the screen. Thanks, Buck Brown
-
Hi, I'm using Visual Studio 2005 C++/CLI. I have setup a zoom function that uses a Matrix class. Changing the Scale of the matrix will cause the image on the screen to zoom in or zoom out. On the zoom in function the upper left corner of the screen (0,0) is anchored so it appears that you are zooming in on the upper left corner. I can't seem to find the correct way to change the bounds of the screen because all of the Screen class properties seem to be read only. Is a screen class the right approach? Ideally I want the zoom functions to zoom relative to where the mouse is clicked on the screen. Thanks, Buck Brown
These should help point you in the right direction http://www.codeproject.com/KB/graphics/PictureBoxZoom.aspx[^] http://www.codeproject.com/KB/cpp/GDI_.aspx[^]
led mike