dxfjs / writer

A JavaScript dxf generator written in TypeScript.
https://dxf.vercel.app
MIT License
85 stars 17 forks source link

i have issue when addImage #169

Open baonguyentuan opened 6 months ago

baonguyentuan commented 6 months ago

i add many image to cad but when i save to dwg or restart my computer file cad receive only last image. If I open the dxf file immediately it still receive all image imgRegion.forEach((img, index) => { let ordinateBotLeft = convertWgs84ToVn2000([ img.pointCenter[0] - dx / 2, img.pointCenter[1] - dy / 2, 0, ]); let ordinateTopRight = convertWgs84ToVn2000([ img.pointCenter[0] + dx / 2, img.pointCenter[1] + dy / 2, 0, ]); dxf.addImage( "..\" + img.name + ".png", img.name, point3d(ordinateBotLeft[1], ordinateBotLeft[0]), sizeMap[0], sizeMap[1], Math.abs(ordinateBotLeft[1] - ordinateTopRight[1]), 0 ); });