Google Apps 脚本幻灯片向形状添加阴影
Google Apps Script Slides add shadow to a shape
我正在尝试通过幻灯片的 Google Apps 脚本 Api 为幻灯片中的形状添加阴影。
我关注了https://developers.google.com/slides/reference/rest/v1/presentations.pages/other#Page.Shadow
这是我的 updateShapeRequest 对象
{
"updateShapeProperties":{
"objectId":pageElementId,
"shapeProperties":{
"shadow":{
"alignment": "RECTANGLE_POSITION_UNSPECIFIED",
"alpha":0.5,
"blurRadius":{"unit":"EMU"},
"color":{
"rgbColor": {
"red":0,
"green":0,
"blue":0
},
},
"propertyState":"RENDERED",
"rotateWithShape": false,
"transform": {
"scaleX": 1.5,
"scaleY": 1.5,
"unit": "PT"
}
}
},
"fields":"shadow"
}
}
但是没用。任何帮助是极大的赞赏。
官方文档是这样说的
shadow: The shadow properties of the shape. If unset, the shadow is inherited from a parent placeholder if it exists. If the shape has no parent, then the default shadow matches the defaults for new shapes created in the Slides editor. This property is read-only. Ref
由此可见,在当前阶段,ShapeProperties
的shadow
是只读的。因此,不幸的是,不能使用 UpdateShapePropertiesRequest 和 Slides API 的 batchUpdate 方法添加阴影。而且,在这种情况下,在现阶段,Slides service也无法做到这一点。
那么,将此请求作为对 the issue tracker 的未来请求怎么样?
参考文献:
我正在尝试通过幻灯片的 Google Apps 脚本 Api 为幻灯片中的形状添加阴影。 我关注了https://developers.google.com/slides/reference/rest/v1/presentations.pages/other#Page.Shadow
这是我的 updateShapeRequest 对象
{
"updateShapeProperties":{
"objectId":pageElementId,
"shapeProperties":{
"shadow":{
"alignment": "RECTANGLE_POSITION_UNSPECIFIED",
"alpha":0.5,
"blurRadius":{"unit":"EMU"},
"color":{
"rgbColor": {
"red":0,
"green":0,
"blue":0
},
},
"propertyState":"RENDERED",
"rotateWithShape": false,
"transform": {
"scaleX": 1.5,
"scaleY": 1.5,
"unit": "PT"
}
}
},
"fields":"shadow"
}
}
但是没用。任何帮助是极大的赞赏。
官方文档是这样说的
shadow: The shadow properties of the shape. If unset, the shadow is inherited from a parent placeholder if it exists. If the shape has no parent, then the default shadow matches the defaults for new shapes created in the Slides editor. This property is read-only. Ref
由此可见,在当前阶段,ShapeProperties
的shadow
是只读的。因此,不幸的是,不能使用 UpdateShapePropertiesRequest 和 Slides API 的 batchUpdate 方法添加阴影。而且,在这种情况下,在现阶段,Slides service也无法做到这一点。
那么,将此请求作为对 the issue tracker 的未来请求怎么样?