You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace GeoSigmaViewer
|
|
{
|
|
public class DrawToolBreakDirect : DrawTool
|
|
{
|
|
private MouseMoveResult mmResult;
|
|
public DrawToolBreakDirect()
|
|
{
|
|
ToolCursor = DrawCursors.BreakCurve;
|
|
ItemType = DrawItemType.ITEM_BREAK_CURVE_DIRECT;
|
|
mmResult = new MouseMoveResult();
|
|
}
|
|
public override void Start()
|
|
{
|
|
drawer.Cursor = DrawCursors.BreakCurve;
|
|
}
|
|
|
|
public override void End()
|
|
{
|
|
drawer.Cursor = DrawCursors.Select;
|
|
}
|
|
|
|
public override void OnLButtonDown(Drawer drawArea, MouseEventArgs e)
|
|
{
|
|
drawArea.Geo.OnLButtonDown(e.X, e.Y);
|
|
}
|
|
|
|
public override void OnMouseMove(Drawer drawArea, MouseEventArgs e)
|
|
{
|
|
Graphics g = drawArea.CreateGraphics();
|
|
drawArea.Geo.ItemMouseMove(g.GetHdc(), e.X, e.Y, ref mmResult);
|
|
}
|
|
|
|
public override void OnLButtonUp(Drawer drawArea, MouseEventArgs e)
|
|
{
|
|
drawArea.Geo.OnLButtonUp(e.X, e.Y);
|
|
drawArea.Geo.EnableRedraw(true);
|
|
drawArea.ReDraw();
|
|
}
|
|
}
|
|
}
|