Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qq15725 committed Oct 18, 2024
1 parent 5bef668 commit a62ab94
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/paths/Path2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,6 @@ export class Path2D {

transform(matrix: Matrix3): this {
this.forEachCurve(curve => curve.transform(matrix))
const vec = new Vector2()
const transformX = (x: number): number => {
vec.x = x
vec.applyMatrix3(matrix)
return vec.x
}
const style = this.style
if (style.strokeWidth) {
style.strokeWidth = transformX(style.strokeWidth)
}
if (style.strokeDashoffset) {
style.strokeDashoffset = transformX(style.strokeDashoffset)
}
if (style.strokeDasharray) {
style.strokeDasharray = style.strokeDasharray.map(v => transformX(v))
}
return this
}

Expand Down

0 comments on commit a62ab94

Please sign in to comment.