Skip to content

Commit

Permalink
Use average scale for path
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Jan 15, 2024
1 parent d756617 commit ad1ad27
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ class PathLayer : ILayer {
synchronized(lock) {
lineObj.clear()
pathObj?.reset()
val before = currentScale
renderer.render(points, lineObj)
.copy(
style = path.style,
color = path.color,
renderedScale = currentScale,
// A best guess at what scale the path was rendered at
renderedScale = (before + currentScale) / 2f,
path = pathObj?.also {
it.drawLines(lineObj.toFloatArray())
})
Expand Down

0 comments on commit ad1ad27

Please sign in to comment.