Skip to content

Commit

Permalink
更新画布蒙版
Browse files Browse the repository at this point in the history
  • Loading branch information
more-strive committed Dec 5, 2023
1 parent da0d1ea commit 68940f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/views/Canvas/useCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export default () => {
})

const maskPath = `M0 0 L${Padding} 0 L${Padding} ${Padding} L0 ${Padding} L0 0 Z
M${PaddingHalf + left - clipPX} ${PaddingHalf + top - clipPX}
L${PaddingHalf + left - clipPX} ${PaddingHalf + top + workHeight + clipPX}
L${PaddingHalf + left + workWidth + clipPX} ${PaddingHalf + top + workHeight + clipPX}
L${PaddingHalf + left + workWidth + clipPX} ${PaddingHalf + top - clipPX}
L${PaddingHalf + left - clipPX} ${PaddingHalf + top - clipPX} Z`
M${PaddingHalf + left} ${PaddingHalf + top}
L${PaddingHalf + left} ${PaddingHalf + top + workHeight}
L${PaddingHalf + left + workWidth} ${PaddingHalf + top + workHeight}
L${PaddingHalf + left + workWidth} ${PaddingHalf + top}
L${PaddingHalf + left} ${PaddingHalf + top} Z`

const workSpaceMask = new Path(maskPath, {
left: -PaddingHalf,
Expand Down

0 comments on commit 68940f6

Please sign in to comment.