如果我有一个结构文本对象,我可以在左侧和顶部属性中添加一个数字,并开始从维度中减去以模拟填充吗?
例如:
let padding = 4;
let left = textObject.left + padding;
let top = textObject.top + padding;
let width = textObject.width - (2 * padding);
let height = textObject.height - (2 * padding);
textObject.set({left: left, top: top, width: width, height: height});
textObject.setCoords();