Use Fractions to represent zoom factor

The goal is to be able to get as close as possible to perfect 66.(6)% (2/3) zoom factor, and also remove types mismatch between the editor form and the surface.
This commit is contained in:
Killy 2020-04-30 17:57:36 +03:00
commit dcf75fd081
5 changed files with 183 additions and 29 deletions

View file

@ -23,6 +23,7 @@ using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.Effects;
using GreenshotPlugin.Interfaces.Drawing;
@ -193,9 +194,9 @@ namespace GreenshotPlugin.Interfaces
}
/// <summary>
/// Zoom value applied to the surface. 1.0f for actual size (100%).
/// Zoom value applied to the surface.
/// </summary>
float ZoomFactor { get; set; }
Fraction ZoomFactor { get; set; }
/// <summary>
/// Translate a point from image coorditate space to surface coordinate space.
/// </summary>