mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Restored Jens his Animation logic, this does cause problems with the drawing as the size is not exact.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2339 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ae38bd7ac2
commit
03efcf8d17
2 changed files with 50 additions and 6 deletions
|
@ -72,7 +72,7 @@ namespace Greenshot.Forms {
|
|||
private Point previousMousePos = Point.Empty;
|
||||
private FixMode fixMode = FixMode.None;
|
||||
private RectangleAnimator windowAnimator = new RectangleAnimator(Rectangle.Empty, Rectangle.Empty, 0);
|
||||
private SizeAnimator zoomAnimator;
|
||||
private FlexibleAnimator<Size> zoomAnimator;
|
||||
|
||||
/// <summary>
|
||||
/// Property to access the selected capture rectangle
|
||||
|
@ -179,7 +179,14 @@ namespace Greenshot.Forms {
|
|||
WindowDetails.ToForeground(this.Handle);
|
||||
this.TopMost = true;
|
||||
|
||||
zoomAnimator = new SizeAnimator(Size.Empty, new Size(200, 200), 10);
|
||||
zoomAnimator = new FlexibleAnimator<Size>(Size.Empty,
|
||||
delegate(Size current) {
|
||||
return current.Width < 200;
|
||||
},
|
||||
delegate(Size current) {
|
||||
int newvalue = current.Width + (220-current.Width) /5;
|
||||
return new Size(newvalue, newvalue);
|
||||
});
|
||||
if (timer != null) {
|
||||
timer.Interval = 30;
|
||||
timer.Tick += new EventHandler(timer_Tick);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue