Skip to content

Commit

Permalink
fix: fix issue with cornerType not setted
Browse files Browse the repository at this point in the history
  • Loading branch information
neuqzxy committed Dec 30, 2024
1 parent 5fc3bc5 commit 3b1356a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class DefaultRectRenderContribution implements IRectRenderContribution {
width - sign * dw,
height - sign * dw,
cornerRadius,
cornerType === 'round'
cornerType !== 'bevel'
);
}

Expand Down Expand Up @@ -217,7 +217,7 @@ export class SplitRectAfterRenderContribution implements IRectRenderContribution
width,
height,
cornerRadius,
cornerType === 'round',
cornerType !== 'bevel',
new Array(4).fill(0).map((_, i) => (x1: number, y1: number, x2: number, y2: number) => {
if (stroke[i]) {
if (!(lastStrokeI === i - 1 && stroke[i] === lastStroke)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class DefaultCanvasGroupRender implements IGraphicRender {
} else {
context.beginPath();
// 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache
createRectPath(context, x, y, width, height, cornerRadius, cornerType === 'round');
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
}

if (!this._groupRenderContribitions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class DefaultCanvasImageRender extends BaseRender<IImage> implements IGra
// 不需要处理圆角
} else {
context.beginPath();
createRectPath(context, x, y, width, height, cornerRadius, cornerType === 'round');
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
needRestore = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class DefaultCanvasRectRender extends BaseRender<IRect> implements IGraph
context.beginPath();

// 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache
createRectPath(context, x, y, width, height, cornerRadius, cornerType === 'round');
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
}

const doFillOrStroke = {
Expand Down

0 comments on commit 3b1356a

Please sign in to comment.