SoftEdgeFormat
SoftEdgeFormat class
表示对象的软边缘格式。
public class SoftEdgeFormat
特性
姓名 | 描述 |
---|---|
Radius { get; set; } | 获取或设置一个双精度值,以点 (pt) 为单位表示柔和边缘效果的半径长度。 默认值为 0.0。 |
方法
姓名 | 描述 |
---|---|
Remove() | 删除SoftEdgeFormat 来自父对象。 |
评论
使用SoftEdge
属性来访问对象的软边缘属性。 您不创建SoftEdgeFormat
直接上课。
例子
展示如何使用软边缘格式。
DocumentBuilder builder = new DocumentBuilder();
Shape shape = builder.InsertShape(ShapeType.Rectangle, 200, 200);
// 将柔和的边缘应用于形状。
shape.SoftEdge.Radius = 30;
builder.Document.Save(ArtifactsDir + "Shape.SoftEdge.docx");
// 加载具有软边缘的矩形文档。
Document doc = new Document(ArtifactsDir + "Shape.SoftEdge.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
SoftEdgeFormat softEdgeFormat = shape.SoftEdge;
// 检查软边缘半径。
Assert.AreEqual(30, softEdgeFormat.Radius);
// 从形状中移除软边缘。
softEdgeFormat.Remove();
// 检查已移除软边缘的半径。
Assert.AreEqual(0, softEdgeFormat.Radius);
也可以看看
- 命名空间 Aspose.Words.Drawing
- 部件 Aspose.Words