Utils.frameInset(frame, inset)
Arguments(参数)
frame— An object with x, y, width, height. 译:具有X、Y、宽度、高度的物体。inset— A number or object with top, right, bottom, left 译:顶部的数字或对象,右,底部,左
Inset a frame by a certain amount of pixels.
译:插入一帧由一定数量的像素。
print Utils.frameInset({x:0, y:0, width:100, height:100}, 10)
# Output {x:10, y:10, width:80, height:80}
print Utils.frameInset({x:0, y:0, width:100, height:100}, {top: 20})
# Output {x:0, y:20, width:100, height:80}