Merge pull request #2909 from L1Q/master

Fixes
This commit is contained in:
Jaex 2017-11-07 21:56:06 +03:00 committed by GitHub
commit d2904b3740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 7 deletions

View file

@ -125,11 +125,11 @@ public virtual void Resize(int x, int y, bool fromBottomRight)
{
if (fromBottomRight)
{
Rectangle = Rectangle.SizeOffset(x, y);
EndPosition = EndPosition.Add(x, y);
}
else
{
Rectangle = Rectangle.LocationOffset(x, y).SizeOffset(-x, -y);
StartPosition = StartPosition.Add(x, y);
}
}

View file

@ -51,7 +51,7 @@ public void UpdateCursor(IntPtr cursorHandle, Point position)
cursorBitmap = icon.ToBitmap();
StartPosition = position;
EndPosition = new Point(position.X + cursorBitmap.Size.Width, position.Y + cursorBitmap.Size.Height);
EndPosition = new Point(position.X + cursorBitmap.Size.Width - 1, position.Y + cursorBitmap.Size.Height - 1);
}
public override void ShowNodes()

View file

@ -55,7 +55,8 @@ public void SetImage(Image img, bool centerImage)
location = Rectangle.Location;
}
Rectangle = new Rectangle(location, size);
StartPosition = location;
EndPosition = new Point(location.X + size.Width - 1, location.Y + size.Height - 1);
}
}

View file

@ -41,7 +41,7 @@ public class StepDrawingShape : EllipseDrawingShape
public StepDrawingShape()
{
StartPosition = new Point(0, 0);
EndPosition = new Point(DefaultSize, DefaultSize);
EndPosition = new Point(DefaultSize - 1, DefaultSize - 1);
}
public override void ShowNodes()
@ -53,7 +53,7 @@ public override void OnCreating()
Manager.IsMoving = true;
Point pos = InputManager.ClientMousePosition;
StartPosition = new Point(pos.X - DefaultSize / 2, pos.Y - DefaultSize / 2);
EndPosition = new Point(pos.X + DefaultSize / 2, pos.Y + DefaultSize / 2);
EndPosition = new Point(pos.X + DefaultSize / 2 - 1, pos.Y + DefaultSize / 2 - 1);
}
public override void OnConfigLoad()

View file

@ -164,7 +164,7 @@ public void AutoSize(bool center)
}
StartPosition = location;
EndPosition = new Point(location.X + size.Width, location.Y + size.Height);
EndPosition = new Point(location.X + size.Width - 1, location.Y + size.Height - 1);
}
}
}