Closed Jan-Sandr closed 2 years ago
I tried to invent some new way how to work with zoom in calculation better. Maybe I found some possibilities but currently I don't have enough options to test if output result is correct. For this time I will implement it in same way like it was in old Grafer. So ZoomLevel
will be limited from -4 to 4.
Story:
Coordinate System:
It would be nice if you user can zoom in and zoom out coordinate system for function examine purpose. Begin with adding new property
int ZoomLevel
This property will change when user scroll. Useprotected override void OnMouseWheel()
to detect scroll event. Also add second propertydouble Zoom
which will be used to setZoomLevel
In methodSetZoom()
Zoom
will be calculated withMath.Pow()
as base 1.25 (this number is quiet a nice constant for smooth zoom) and as exponentZoomLevel
As last add slider for better user expirience.Main:
In constructor add wheel event for
coordinateSystem
and when occur call methodStart()
to refresh function.Function:
Adjust calculation process to be able to calculate points well for current zoom.
To do: