dxfjs/writer

i have issue when addImage

Opened this issue · 0 comments

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
);
});