more work on gtk & code cleanup

This commit is contained in:
2025-06-16 15:30:56 +02:00
parent 6f7bb5d92c
commit a49a3b2beb
69 changed files with 374 additions and 268 deletions

View File

@@ -1,8 +1,5 @@
using Pilz.Drawing;
using System;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace Pilz.UI.WinForms.PaintingControl;
@@ -95,7 +92,7 @@ internal class PaintingObjectResizing
private EdgeEnum mEdge = EdgeEnum.None;
private int mWidth = 4;
private int qWidth = 4 * 4;
private Rectangle rect = new Rectangle();
private Rectangle rect = new();
public bool Enabled { get; set; } = true;
public SizeF MinimumSize { get; set; } = new SizeF(15f, 15f);
@@ -239,11 +236,13 @@ internal class PaintingObjectResizing
RectangleF extRect = mObj.RectangleExtended;
var oldRect = mObj.Rectangle;
var newRect = new RectangleF();
newRect.X = extRect.X - oldRect.X;
newRect.Y = extRect.Y - oldRect.Y;
newRect.Width = (extRect.Width - oldRect.Width) / 2f;
newRect.Height = (extRect.Height - oldRect.Height) / 2f;
var newRect = new RectangleF
{
X = extRect.X - oldRect.X,
Y = extRect.Y - oldRect.Y,
Width = (extRect.Width - oldRect.Width) / 2f,
Height = (extRect.Height - oldRect.Height) / 2f
};
var setToNone = false;
var isOnTop = ReferenceEquals(mObj.Parent.GetObject(new PointF(realX, realY), true), mObj);