svg路径限制最小像素

This commit is contained in:
Donal 2020-09-13 16:40:48 +08:00
parent 6bf5157d17
commit 1216f59e05

View File

@ -262,8 +262,8 @@ export default {
const ctm = pathObject['@_CTM'];
let svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
svg.setAttribute('version','1.1');
svg.style.width = boundary.w;
svg.style.height = boundary.h;
svg.style.width = boundary.w>1?boundary.w:1;
svg.style.height = boundary.h>1?boundary.h:1;
let path = document.createElementNS('http://www.w3.org/2000/svg','path');
if (lineWidth) {
defaultLineWith = converterDpi(lineWidth);