CaptureInfo.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package com.luooqi.ocr.model;
  2. import cn.hutool.core.swing.ScreenUtil;
  3. import javafx.beans.binding.BooleanBinding;
  4. import javafx.beans.property.BooleanProperty;
  5. import javafx.beans.property.SimpleBooleanProperty;
  6. import javafx.scene.text.Font;
  7. import javafx.scene.text.FontWeight;
  8. /**
  9. * @author GOXR3PLUS
  10. *
  11. */
  12. public class CaptureInfo {
  13. /** The x pressed. */
  14. public int mouseXPressed = 0;
  15. /** The y pressed. */
  16. public int mouseYPressed = 0;
  17. /** The x now. */
  18. public int mouseXNow = 0;
  19. /** The y now. */
  20. public int mouseYNow = 0;
  21. /** The upper left X. */
  22. public int rectUpperLeftX = 0;
  23. /** The upper left Y. */
  24. public int rectUpperLeftY = 0;
  25. /** The rectangle width. */
  26. public int rectWidth;
  27. /** The rectangle height. */
  28. public int rectHeight;
  29. // ----------------
  30. /** The font. */
  31. public Font font = Font.font("", FontWeight.BOLD, 14);
  32. // ---------------
  33. /** The shift pressed. */
  34. public BooleanProperty shiftPressed = new SimpleBooleanProperty();
  35. /** The up pressed. */
  36. public BooleanProperty upPressed = new SimpleBooleanProperty();
  37. /** The right pressed. */
  38. public BooleanProperty rightPressed = new SimpleBooleanProperty();
  39. /** The down pressed. */
  40. public BooleanProperty downPressed = new SimpleBooleanProperty();
  41. /** The left pressed. */
  42. public BooleanProperty leftPressed = new SimpleBooleanProperty();
  43. /** The any pressed. */
  44. public BooleanBinding anyPressed = upPressed.or(downPressed).or(leftPressed).or(rightPressed);
  45. /** The hide extra features. */
  46. public BooleanProperty hideExtraFeatures = new SimpleBooleanProperty();
  47. // ------------
  48. /** The screen width. */
  49. public static int ScreenWidth = ScreenUtil.getWidth();
  50. /** The screen height. */
  51. public static int ScreenHeight = ScreenUtil.getHeight();
  52. public static int ScreenMinX = 0;
  53. public static int ScreenMaxX = 0;
  54. public void reset(){
  55. mouseXNow = 0;
  56. mouseXPressed = 0;
  57. mouseYNow = 0;
  58. mouseYPressed = 0;
  59. rectUpperLeftY = 0;
  60. rectUpperLeftX = 0;
  61. rectWidth = 0;
  62. rectHeight = 0;
  63. }
  64. }