气泡测量工具:修改鼠标光标
This commit is contained in:
@@ -418,7 +418,30 @@ namespace XP.ImageProcessing.RoiControl.Controls
|
||||
private bool _bubbleBrushDragging;
|
||||
private readonly System.Collections.Generic.Stack<byte[]> _bubbleUndoStack = new();
|
||||
|
||||
public void SetBubbleTool(BubbleSubTool tool) => _bubbleTool = tool;
|
||||
public void SetBubbleTool(BubbleSubTool tool)
|
||||
{
|
||||
_bubbleTool = tool;
|
||||
// 根据工具设置光标
|
||||
UpdateBubbleToolCursor();
|
||||
}
|
||||
|
||||
private void UpdateBubbleToolCursor()
|
||||
{
|
||||
if (mainCanvas == null) return;
|
||||
if (CurrentMeasureMode != Models.MeasureMode.BubbleMeasure)
|
||||
{
|
||||
mainCanvas.Cursor = Cursors.Arrow;
|
||||
return;
|
||||
}
|
||||
mainCanvas.Cursor = _bubbleTool switch
|
||||
{
|
||||
BubbleSubTool.Wand => Cursors.Cross,
|
||||
BubbleSubTool.Brush => Cursors.Pen,
|
||||
BubbleSubTool.Eraser => Cursors.No,
|
||||
_ => Cursors.Arrow
|
||||
};
|
||||
}
|
||||
|
||||
public void SetBubbleThreshold(int val) => _bubbleThreshold = val;
|
||||
public void SetBubbleBrushSize(int val) => _bubbleBrushSize = val;
|
||||
public void SetBubbleVoidLimit(double val) { _bubbleVoidLimit = val; UpdateBubbleResult(); }
|
||||
|
||||
Reference in New Issue
Block a user