Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. diff --git a/krita/ui/input/wintab/kis_tablet_support_x11.cpp b/krita/ui/input/wintab/kis_tablet_support_x11.cpp
  2. index 8a6c975..4b51f04 100644
  3. --- a/krita/ui/input/wintab/kis_tablet_support_x11.cpp
  4. +++ b/krita/ui/input/wintab/kis_tablet_support_x11.cpp
  5. @@ -305,6 +305,15 @@ void kis_x11_init_tablet()
  6. device_data.maxTanPressure = 0;
  7. device_data.minZ = 0;
  8. device_data.maxZ = 0;
  9. +
  10. + qDebug() << "=== Getting tablet limits ===";
  11. + qDebug() << ppVar(a[0].min_value) << ppVar(a[0].max_value);
  12. + qDebug() << ppVar(a[1].min_value) << ppVar(a[1].max_value);
  13. + qDebug() << ppVar(a[2].min_value) << ppVar(a[2].max_value) << " <-- pressure";
  14. + qDebug() << ppVar(a[3].min_value) << ppVar(a[3].max_value);
  15. + qDebug() << ppVar(a[4].min_value) << ppVar(a[4].max_value);
  16. + qDebug() << ppVar(a[5].min_value) << ppVar(a[5].max_value);
  17. + qDebug() << "=============================";
  18. #endif
  19.  
  20. // got the max pressure no need to go further...
  21. @@ -501,6 +510,16 @@ bool translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet, QWidget *
  22. hiRes = tablet->scaleCoord(motion->axis_data[0], motion->axis_data[1],
  23. screenArea.x(), screenArea.width(),
  24. screenArea.y(), screenArea.height());
  25. +
  26. + qDebug() << "*** MotionEvent ***";
  27. + qDebug() << ppVar(pressure);
  28. + qDebug() << ppVar(rotation);
  29. + qDebug() << ppVar(xTilt) << ppVar(yTilt);
  30. + qDebug() << ppVar(motion->deviceid);
  31. + qDebug() << ppVar(tablet->minPressure) << ppVar(tablet->maxPressure);
  32. + qDebug() << "*******************";
  33. +
  34. +
  35. } else if (button) {
  36. xTilt = (short) button->axis_data[3];
  37. yTilt = (short) button->axis_data[4];
  38. diff --git a/krita/ui/tool/kis_tool_freehand.cc b/krita/ui/tool/kis_tool_freehand.cc
  39. index deae910..65cf4a5 100644
  40. --- a/krita/ui/tool/kis_tool_freehand.cc
  41. +++ b/krita/ui/tool/kis_tool_freehand.cc
  42. @@ -172,6 +172,9 @@ bool KisToolFreehand::primaryActionSupportsHiResEvents() const
  43.  
  44. void KisToolFreehand::beginPrimaryAction(KoPointerEvent *event)
  45. {
  46. + qDebug() << "## Begin stroke" << ppVar(event->pos()) << ppVar(event->globalPos()) << ppVar(event->point) << ppVar(event->pressure());
  47. +
  48. +
  49. // FIXME: workaround for the Duplicate Op
  50. tryPickByPaintOp(event, PickFgImage);
  51.  
  52. @@ -201,6 +204,8 @@ void KisToolFreehand::beginPrimaryAction(KoPointerEvent *event)
  53.  
  54. void KisToolFreehand::continuePrimaryAction(KoPointerEvent *event)
  55. {
  56. + qDebug() << "## Conti stroke" << ppVar(event->pos()) << ppVar(event->globalPos()) << ppVar(event->point) << ppVar(event->pressure());
  57. +
  58. KIS_ASSERT_RECOVER_RETURN(mode() == KisTool::PAINT_MODE);
  59.  
  60. requestUpdateOutline(event->point);
  61. @@ -213,6 +218,8 @@ void KisToolFreehand::continuePrimaryAction(KoPointerEvent *event)
  62.  
  63. void KisToolFreehand::endPrimaryAction(KoPointerEvent *event)
  64. {
  65. + qDebug() << "## End stroke" << ppVar(event->pos()) << ppVar(event->globalPos()) << ppVar(event->point) << ppVar(event->pressure());
  66. +
  67. Q_UNUSED(event);
  68. KIS_ASSERT_RECOVER_RETURN(mode() == KisTool::PAINT_MODE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement