ACEDrawingView icon indicating copy to clipboard operation
ACEDrawingView copied to clipboard

Implementing 3D-Touch

Open enstulen opened this issue 9 years ago • 2 comments

I want to implement 3D-Touch and change the linewidth based on the pressure. In the touchesMoved I use this code to change the lineWidth:

    CGFloat maximumPossibleForce = touch.maximumPossibleForce;
    CGFloat force = touch.force;
    CGFloat normalizedForce = force/maximumPossibleForce;
    CGFloat lineWidth = normalizedForce * 10;
    self.currentTool.lineWidth = lineWidth;

It works, however, when crossing lines with a previously drawn line, it overrides it. If anyone knows a solution I would greatly appreciate it! Thanks :)

enstulen avatar Jun 30 '16 03:06 enstulen

Picture: asset

enstulen avatar Jun 30 '16 04:06 enstulen

I got a similar problem when rotating the view.... I also get such annoying fragments :S

BlaXun avatar Jul 18 '16 13:07 BlaXun