mirror of
https://gitee.com/Donal/ofd.js.git
synced 2024-12-02 03:48:44 +08:00
线条宽高取证
This commit is contained in:
parent
1216f59e05
commit
43d23e4b72
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user