Fix shapes being 1px bigger

This commit is contained in:
L1Q 2017-11-07 19:06:35 +02:00
parent eaac08413c
commit b902e33593
3 changed files with 4 additions and 4 deletions

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

@ -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);
}
}
}