Jan-Sandr / Grafer

2 stars 1 forks source link

[App] Implement zoom #123

Closed Jan-Sandr closed 2 years ago

Jan-Sandr commented 2 years ago

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. Use protected override void OnMouseWheel() to detect scroll event. Also add second property double Zoom which will be used to set ZoomLevel In method SetZoom() Zoom will be calculated with Math.Pow() as base 1.25 (this number is quiet a nice constant for smooth zoom) and as exponent ZoomLevel As last add slider for better user expirience.

Main:

In constructor add wheel event for coordinateSystem and when occur call method Start() to refresh function.

Function:

Adjust calculation process to be able to calculate points well for current zoom.

To do:

Jan-Sandr commented 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.