线条宽高取证

This commit is contained in:
Donal 2020-09-13 20:49:03 +08:00
parent 1216f59e05
commit 43d23e4b72
2 changed files with 3 additions and 3 deletions

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>1?boundary.w:1;
svg.style.height = boundary.h>1?boundary.h:1;
svg.style.width = Math.ceil(boundary.w);
svg.style.height = Math.ceil(boundary.h);
let path = document.createElementNS('http://www.w3.org/2000/svg','path');
if (lineWidth) {
defaultLineWith = converterDpi(lineWidth);

View File

@ -80,7 +80,7 @@ const millimetersToPixel = function (mm, dpi) {
}
export const converterDpi = function (width) {
return millimetersToPixel(width, 5*25.4);
return millimetersToPixel(width, 3.78*25.4);
}
export const deltaFormatter = function (delta) {