feat: 四圆角独立处理 + transform rotate

- 圆角:取四角最大值(PPT只支持统一圆角)
- 旋转:CSS transform:rotate → pptxgenjs rotate
- 两个文件同步
This commit is contained in:
李进
2026-07-27 17:16:21 +08:00
parent d3bb1fe952
commit ce89ee1b4d
2 changed files with 23 additions and 11 deletions
+1 -2
View File
@@ -476,8 +476,7 @@ async function convertToPptx(input, onProgress) {
// 形状类型
var useShape = 'rect';
if (shapeOpts.rectRadius) {
var brPct = parseFloat(n.styles.borderTopLeftRadius);
var isCircle = (brPct >= 50 || (brPct.toString().includes('%') && parseFloat(brPct) >= 50)) && Math.abs(opts.w - opts.h) < 0.05;
var isCircle = shapeOpts.rectRadius >= 0.5 && Math.abs(opts.w - opts.h) < 0.05;
useShape = isCircle ? 'ellipse' : 'roundRect';
}
objects.push({ type: 'shape', shapeName: useShape, options: shapeOpts });