Skip to content

Commit ba55370

Browse files
committed
fixed: In high-DPI pictures, the "dialog clear" function may cover the dialog box's edge..
for protect the dialog box's edge, "dialog clear" may do contraction after selected dialog area by magic wand, but the contraction size is a fixed value, now it has been automatically adjusted according to the DPI.
1 parent a3a8222 commit ba55370

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/importer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ function importImage(img: ImageInfo): boolean
122122
points.push({ x: l.x, y: l.y });
123123
}
124124
}
125-
log("do lp_dialogClear: " + points);
126-
MyAction.lp_dialogClear(points, img.ws.doc.width, img.ws.doc.height, 16, 1, img.ws.dialogOverlayLayer);
125+
126+
let contract_px = (img.ws.doc.resolution / 72) * 2;
127+
let tolerance = 16;
128+
log("do lp_dialogClear ,contract_px=" + contract_px + ",tolerance=" + tolerance);
129+
MyAction.lp_dialogClear(points, img.ws.doc.width, img.ws.doc.height, tolerance, contract_px, img.ws.dialogOverlayLayer);
127130
delArrayElement<ArtLayer>(img.ws.pendingDelLayerList, img.ws.dialogOverlayLayer); // do not delete dialog-overlay-layer
128131
}
129132

0 commit comments

Comments
 (0)