diff --git a/src/canvas_modes.cpp b/src/canvas_modes.cpp index 6c6abdc..b83e587 100644 --- a/src/canvas_modes.cpp +++ b/src/canvas_modes.cpp @@ -111,6 +111,12 @@ void CanvasModePen::on_MouseEvent(MouseEvent* me, glm::vec2& loc) if (Canvas::I->m_touch_lock && me->m_source == kEventSource::Touch) return; +#if _WIN32 + // curve https://www.wolframalpha.com/input/?i=plot+(1-(x-1)%5E2)%5E2+from+x%3D0+to+1 + auto curve = [](float x, float max) { return x > max ? 1.f : glm::pow(1.f - glm::pow(x / max - 1.f, 2.f), 2.f); }; + me->m_pressure = curve(me->m_pressure, 0.95f); +#endif + switch (me->m_type) { case kEventType::MouseDownL: