SetLockAspectRatio

SetLockAspectRatio

锁定当前图片表的侧比

参数:

名称 类型 默认 描述性
slock系统 布林安 真实性

指定当前图片表的侧比是否锁定(真)或非锁定(假)。

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentVar OpictureForm = Api.CreatePictureFormvarolements=ODocument.GetEplement0oParagraph.AddElement(oPictureForm)!oPictureForm.SetImage("https://api.onlyoffice.com/content/img/docbuilder/examples/user-profile.png")!oPictureForm.SetLockAspectRatio(true)!varblock =OPICTERFORM.IsLockAspecitRatioodeptes = Api.Createlementsod.adText(“文档中第一图片表的侧比锁定 :+block”)oDocument.Push(oParagraph)!builder.SaveFile("docx", "SetLockAspectRatio.docx")!builder.CloseFile();

结果文档