[visual] Change pressure sensitivity from linear to exponential

The default dependence of thickness on pressure is linear; this gives a
weird feel (to me).  Turn it into an exponential relation.
wilder/main-rebasing
Jacopo De Simoi 5 years ago committed by Jacopo De Simoi
parent cbca4031c4
commit b6ac011067
  1. 3
      src/core/gui/inputdevices/AbstractInputHandler.cpp

@ -7,6 +7,7 @@
#include "gui/XournalppCursor.h"
#include "InputContext.h"
#include <cmath>
AbstractInputHandler::AbstractInputHandler(InputContext* inputContext) { this->inputContext = inputContext; }
@ -69,7 +70,7 @@ auto AbstractInputHandler::getInputDataRelativeToCurrentPage(XojPageView* page,
pos.pressure = Point::NO_PRESSURE;
if (this->inputContext->getSettings()->isPressureSensitivity()) {
pos.pressure = event.pressure;
pos.pressure = 1-exp(- event.pressure/0.2);
}
pos.state = this->inputContext->getModifierState();

Loading…
Cancel
Save