mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Allow moving all freehand points while creating it using ctrl
This commit is contained in:
parent
d33b19e3c7
commit
7ac883e8b9
2 changed files with 22 additions and 15 deletions
|
@ -136,7 +136,7 @@ public virtual void OnUpdate()
|
||||||
{
|
{
|
||||||
if (Manager.IsCreating && !Rectangle.IsEmpty)
|
if (Manager.IsCreating && !Rectangle.IsEmpty)
|
||||||
{
|
{
|
||||||
Point currentPosition = InputManager.MousePosition0Based;
|
Point pos = InputManager.MousePosition0Based;
|
||||||
|
|
||||||
if (Manager.IsCornerMoving)
|
if (Manager.IsCornerMoving)
|
||||||
{
|
{
|
||||||
|
@ -146,19 +146,19 @@ public virtual void OnUpdate()
|
||||||
{
|
{
|
||||||
if (NodeType == NodeType.Rectangle)
|
if (NodeType == NodeType.Rectangle)
|
||||||
{
|
{
|
||||||
currentPosition = CaptureHelpers.SnapPositionToDegree(StartPosition, currentPosition, 90, 45);
|
pos = CaptureHelpers.SnapPositionToDegree(StartPosition, pos, 90, 45);
|
||||||
}
|
}
|
||||||
else if (NodeType == NodeType.Line)
|
else if (NodeType == NodeType.Line)
|
||||||
{
|
{
|
||||||
currentPosition = CaptureHelpers.SnapPositionToDegree(StartPosition, currentPosition, 45, 0);
|
pos = CaptureHelpers.SnapPositionToDegree(StartPosition, pos, 45, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Manager.IsSnapResizing)
|
else if (Manager.IsSnapResizing)
|
||||||
{
|
{
|
||||||
currentPosition = Manager.SnapPosition(StartPosition, currentPosition);
|
pos = Manager.SnapPosition(StartPosition, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
EndPosition = currentPosition;
|
EndPosition = pos;
|
||||||
}
|
}
|
||||||
else if (Manager.IsMoving)
|
else if (Manager.IsMoving)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,24 +42,31 @@ public override void OnUpdate()
|
||||||
{
|
{
|
||||||
if (Manager.IsCreating)
|
if (Manager.IsCreating)
|
||||||
{
|
{
|
||||||
Point pos = InputManager.MousePosition0Based;
|
if (Manager.IsCornerMoving)
|
||||||
|
|
||||||
if (points.Count == 0 || (!Manager.IsProportionalResizing && points[points.Count - 1] != pos))
|
|
||||||
{
|
{
|
||||||
points.Add(pos);
|
Move(InputManager.MouseVelocity);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (Manager.IsProportionalResizing)
|
|
||||||
{
|
{
|
||||||
if (!isPolygonMode)
|
Point pos = InputManager.MousePosition0Based;
|
||||||
|
|
||||||
|
if (points.Count == 0 || (!Manager.IsProportionalResizing && points[points.Count - 1] != pos))
|
||||||
{
|
{
|
||||||
points.Add(pos);
|
points.Add(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
points[points.Count - 1] = pos;
|
if (Manager.IsProportionalResizing)
|
||||||
}
|
{
|
||||||
|
if (!isPolygonMode)
|
||||||
|
{
|
||||||
|
points.Add(pos);
|
||||||
|
}
|
||||||
|
|
||||||
isPolygonMode = Manager.IsProportionalResizing;
|
points[points.Count - 1] = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
isPolygonMode = Manager.IsProportionalResizing;
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle = points.CreateRectangle();
|
Rectangle = points.CreateRectangle();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue