Class LineFill Stay organized with collections Save and categorize content based on your preferences.
Page Summary
LineFill describes the fill of a line or outline.
You can get the type of line fill using
getFillType().You can retrieve the solid fill of a line using
getSolidFill(), which returnsnullif the fill type is notLineFillType.SOLID.The solid fill can be set using various methods that accept different color representations and an optional alpha value.
All methods related to LineFill require authorization with either
https://www.googleapis.com/auth/presentations.currentonlyorhttps://www.googleapis.com/auth/presentationsscopes.
Describes the fill of a line or outline
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Line | Gets the type of the line fill. |
get | Solid | Gets the solid fill of the line, ornull if the fill type is notLine. |
set | void | Sets the solid fill to the givenColor. |
set | void | Sets the solid fill to the given alpha andColor. |
set | void | Sets the solid fill to the given RGB values. |
set | void | Sets the solid fill to the given alpha and RGB values. |
set | void | Sets the solid fill to the given hex color string. |
set | void | Sets the solid fill to the given alpha and hex color string. |
set | void | Sets the solid fill to the givenTheme. |
set | void | Sets the solid fill to the given alpha andTheme. |
Detailed documentation
getFillType()
Gets the type of the line fill.
Return
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getSolidFill()
Gets the solid fill of the line, ornull if the fill type is notLine.
Return
Solid
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(color)
setSolidFill(color, alpha)
Sets the solid fill to the given alpha andColor.
Parameters
| Name | Type | Description |
|---|---|---|
color | Color | |
alpha | Number |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(red, green, blue)
Sets the solid fill to the given RGB values.
Parameters
| Name | Type | Description |
|---|---|---|
red | Integer | |
green | Integer | |
blue | Integer |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(red, green, blue, alpha)
Sets the solid fill to the given alpha and RGB values.
Parameters
| Name | Type | Description |
|---|---|---|
red | Integer | |
green | Integer | |
blue | Integer | |
alpha | Number |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(hexString)
Sets the solid fill to the given hex color string.
The hex string must be in the format '#RRGGBB'. For example, pink is represented as'#FFC0CB'.
Parameters
| Name | Type | Description |
|---|---|---|
hex | String |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(hexString, alpha)
Sets the solid fill to the given alpha and hex color string.
The hex string must be in the format '#RRGGBB'. For example, pink is represented as'#FFC0CB'.
Parameters
| Name | Type | Description |
|---|---|---|
hex | String | |
alpha | Number |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(color)
Sets the solid fill to the givenTheme.
Parameters
| Name | Type | Description |
|---|---|---|
color | Theme |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
setSolidFill(color, alpha)
Sets the solid fill to the given alpha andTheme.
Parameters
| Name | Type | Description |
|---|---|---|
color | Theme | |
alpha | Number |
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.