返回或设置从指定图片或 OLE 对象的右侧裁剪下的磅值。可读/写
Single 类型。裁剪以相对于图片的原始尺寸计算。例如,如果插入的图片原始宽度为 100 磅,将其宽度调整为 200
磅,再将
CropRight 属性设置为 50,则会从图片右侧裁剪 100 磅(而不是 50 磅)。
语法
表达式.CropRight
表达式 一个代表 PictureFormat 对象的变量。
返回值
Single
示例
本示例在 myDocument
中第三个形状的右侧裁剪了 20 磅。要使本示例执行,第三个形状必须是图片或 OLE 对象。
示例代码 |
let myDocument = ActivePresentation.Slides.Item(1)
myDocument.Shapes.Item(3).PictureFormat.CropRight = 20
|
本示例实现的功能是:根据用户指定的百分比从右边裁剪所选图形,而无论该图形是否经过缩放。要使本示例执行,选定的形状必须是图片或 OLE 对象。
示例代码 |
let percentToCrop = prompt("What percentage do you want to crop off the right of this picture?")
let shapeToCrop = ActiveWindow.Selection.ShapeRange.Item(1)
let myPictureFormat = shapeToCrop.Duplicate()
myPictureFormat.ScaleWidth(1, true)
let origWidth = myPictureFormat.Width
myPictureFormat.Delete()
let cropPoints = origWidth * percentToCrop / 100
shapeToCrop.PictureFormat.CropRight = cropPoints
|
CropRight 属性 CropRight 属性 剪切图片的右侧部分? 在右侧使图片更窄? 裁切右侧