more work on gtk & code cleanup
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using Pilz.Drawing;
|
||||
using Pilz.UI.WinForms.PaintingControl.EventArgs;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Pilz.UI.WinForms.PaintingControl;
|
||||
|
||||
@@ -35,7 +31,7 @@ public class DefaultDrawMethodes
|
||||
|
||||
e.Graphics.DrawString(obj.Text, new Font(obj.TextFont.FontFamily, obj.TextFont.Size * zoomFactor, obj.TextFont.Style), b, rect, f);
|
||||
}
|
||||
private static object _DrawPicture_newSyncObj = new object();
|
||||
private static object _DrawPicture_newSyncObj = new();
|
||||
|
||||
public static void DrawPicture(PaintingObjectPaintEventArgs e)
|
||||
{
|
||||
@@ -276,9 +272,11 @@ public class DefaultDrawMethodes
|
||||
public static void DrawAreaSelection(PaintEventArgs e, PaintingControl pc, PointF startMousePos, PointF lastMousePos)
|
||||
{
|
||||
var rectToDraw = HelpfulDrawingFunctions.GetRectangle(startMousePos, lastMousePos);
|
||||
var p = new Pen(pc.AreaSelectionColor);
|
||||
p.DashStyle = startMousePos.X >= lastMousePos.X ? DashStyle.DashDot : DashStyle.Solid;
|
||||
p.Width = 3f;
|
||||
var p = new Pen(pc.AreaSelectionColor)
|
||||
{
|
||||
DashStyle = startMousePos.X >= lastMousePos.X ? DashStyle.DashDot : DashStyle.Solid,
|
||||
Width = 3f
|
||||
};
|
||||
e.Graphics.DrawRectangle(p, rectToDraw.X, rectToDraw.Y, rectToDraw.Width, rectToDraw.Height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user