AutoRulerTool.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using PaintDotNet.Annotation.Enum;
  2. using System;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace PaintDotNet.Annotation.Other
  6. {
  7. /// <summary>
  8. /// 标注->自动标尺
  9. /// </summary>
  10. public class AutoRulerTool : ToolObject
  11. {
  12. public static void OnMouseDown(ISurfaceBox drawArea, MouseEventArgs e)
  13. {
  14. //if (drawArea.GetGainMultiple() == 0)
  15. //{
  16. // MessageBox.Show("请先设置放大倍数");
  17. // return;
  18. //}
  19. //else
  20. //{
  21. AutoRulerDraw newAutoRuler = new AutoRulerDraw(drawArea);
  22. newAutoRuler.ISurfaceBox = drawArea;
  23. AddNewObject(drawArea, newAutoRuler);
  24. drawArea.Refresh();
  25. //}
  26. }
  27. public static void OnMouseMove(ISurfaceBox drawArea, MouseEventArgs e)
  28. {
  29. }
  30. public static void OnMouseUp(ISurfaceBox drawArea, MouseEventArgs e)
  31. {
  32. }
  33. public static void OnMouseClick(ISurfaceBox drawArea, MouseEventArgs e)
  34. {
  35. }
  36. public static void beginWithNewObject()
  37. {
  38. }
  39. }
  40. }