描述网页的背景
方法
方法 | 返回类型 | 简介 |
---|---|---|
get | Picture | 获取此背景的拉伸图片填充,如果背景填充类型不是 Page ,则返回 null 。 |
get | Solid | 获取此背景的纯色填充,如果背景填充类型不是 Page ,则返回 null 。 |
get | Page | 获取相应网页背景的类型。 |
is | Boolean | 背景是否可见。 |
set | void | 将指定图片 blob 中的图片设为网页背景。 |
set | void | 将指定网址处的图片设为网页背景。 |
set | void | 将纯色填充设置为指定的 Color 。 |
set | void | 将纯色填充设置为指定的 Alpha 值和 Color 。 |
set | void | 将纯色填充设置为指定的 RGB 值。 |
set | void | 将纯色填充设置为指定的 Alpha 和 RGB 值。 |
set | void | 将纯色填充设置为给定的十六进制颜色字符串。 |
set | void | 将纯色填充设置为给定的 Alpha 和十六进制颜色字符串。 |
set | void | 将纯色填充设置为指定的 Theme 。 |
set | void | 将纯色填充设置为指定的 Alpha 值和 Theme 。 |
set | void | 将背景设置为透明。 |
详细文档
get Picture Fill()
获取此背景的拉伸图片填充,如果背景填充类型不是 Page
,则返回 null
。
返回
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Solid Fill()
获取此背景的纯色填充,如果背景填充类型不是 Page
,则返回 null
。
返回
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Type()
获取相应网页背景的类型。
返回
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
is Visible()
背景是否可见。
返回
Boolean
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Picture Fill(blobSource)
将指定图片 blob 中的图片设为网页背景。图片会拉伸以匹配页面的尺寸。
插入图片时,系统会从 Blob
中提取一次图片,并存储一份副本以在演示文稿中显示。图片大小必须小于 50MB,像素数不得超过 2500 万,且必须为 PNG、JPEG 或 GIF 格式。
参数
名称 | 类型 | 说明 |
---|---|---|
blob | Blob | 图片数据。 |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Picture Fill(imageUrl)
将指定网址处的图片设为网页背景。图片会拉伸至与页面尺寸相匹配的尺寸。
插入图片时,系统会从相应网址获取图片一次,并存储一份副本以在演示中显示。图片大小必须小于 50MB,像素数不得超过 2500 万,且必须为 PNG、JPEG 或 GIF 格式。
所提供的网址必须可以公开访问,且不得大于 2kB。网址本身会与图片一起保存,并通过 Picture
公开。
参数
名称 | 类型 | 说明 |
---|---|---|
image | String | 用于下载图片的网址。 |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(color)
set Solid Fill(color, alpha)
set Solid Fill(red, green, blue)
将纯色填充设置为指定的 RGB 值。
参数
名称 | 类型 | 说明 |
---|---|---|
red | Integer | |
green | Integer | |
blue | Integer |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(red, green, blue, alpha)
将纯色填充设置为指定的 Alpha 和 RGB 值。
参数
名称 | 类型 | 说明 |
---|---|---|
red | Integer | |
green | Integer | |
blue | Integer | |
alpha | Number |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(hexString)
将纯色填充设置为给定的十六进制颜色字符串。
十六进制字符串必须采用“#RRGGBB”格式。例如,粉色表示为“#FFC0CB”。
参数
名称 | 类型 | 说明 |
---|---|---|
hex | String |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(hexString, alpha)
将纯色填充设置为给定的 Alpha 和十六进制颜色字符串。
十六进制字符串必须采用“#RRGGBB”格式。例如,粉色表示为“#FFC0CB”。
参数
名称 | 类型 | 说明 |
---|---|---|
hex | String | |
alpha | Number |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(color)
将纯色填充设置为指定的 Theme
。
参数
名称 | 类型 | 说明 |
---|---|---|
color | Theme |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Solid Fill(color, alpha)
将纯色填充设置为指定的 Alpha 值和 Theme
。
参数
名称 | 类型 | 说明 |
---|---|---|
color | Theme | |
alpha | Number |
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
set Transparent()
将背景设置为透明。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations