Skip to content

Commit

Permalink
fix for drawing fast arrows by #766
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Feb 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b71c43f commit e57645b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -374,7 +374,7 @@ fun BitmapDrawer(
onDrawStart()
drawPath.moveTo(currentDrawPosition.x, currentDrawPosition.y)
previousDrawPosition = currentDrawPosition
pathWithoutTransformations = drawPath
pathWithoutTransformations = drawPath.copy()
} else {
drawPath = Path()
pathWithoutTransformations = Path()
@@ -421,6 +421,15 @@ fun BitmapDrawer(

DrawPathMode.PointingArrow,
DrawPathMode.DoublePointingArrow -> {
if (previousDrawPosition.isUnspecified && currentDrawPosition.isSpecified) {
drawPath = Path()
drawPath.moveTo(
currentDrawPosition.x,
currentDrawPosition.y
)
pathWithoutTransformations = drawPath.copy()
previousDrawPosition = currentDrawPosition
}
if (previousDrawPosition.isSpecified && currentDrawPosition.isSpecified) {
drawPath = pathWithoutTransformations
drawPath.quadraticTo(

0 comments on commit e57645b

Please sign in to comment.