Class LineFill

  • LineFill describes the fill of a line or outline.

  • You can get the type of line fill usinggetFillType().

  • You can retrieve the solid fill of a line usinggetSolidFill(), which returnsnull if 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 eitherhttps://www.googleapis.com/auth/presentations.currentonly orhttps://www.googleapis.com/auth/presentations scopes.

LineFill

Describes the fill of a line or outline

Methods

MethodReturn typeBrief description
getFillType()LineFillTypeGets the type of the line fill.
getSolidFill()SolidFill|nullGets the solid fill of the line, ornull if the fill type is notLineFillType.SOLID.
setSolidFill(color)voidSets the solid fill to the givenColor.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha andColor.
setSolidFill(red, green, blue)voidSets the solid fill to the given RGB values.
setSolidFill(red, green, blue, alpha)voidSets the solid fill to the given alpha and RGB values.
setSolidFill(hexString)voidSets the solid fill to the given hex color string.
setSolidFill(hexString, alpha)voidSets the solid fill to the given alpha and hex color string.
setSolidFill(color)voidSets the solid fill to the givenThemeColorType.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha andThemeColorType.

Detailed documentation

getFillType()

Gets the type of the line fill.

Return

LineFillType

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getSolidFill()

Gets the solid fill of the line, ornull if the fill type is notLineFillType.SOLID.

Return

SolidFill|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(color)

Sets the solid fill to the givenColor.

Parameters

NameTypeDescription
colorColor

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(color, alpha)

Sets the solid fill to the given alpha andColor.

Parameters

NameTypeDescription
colorColor
alphaNumber

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(red, green, blue)

Sets the solid fill to the given RGB values.

Parameters

NameTypeDescription
redInteger
greenInteger
blueInteger

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(red, green, blue, alpha)

Sets the solid fill to the given alpha and RGB values.

Parameters

NameTypeDescription
redInteger
greenInteger
blueInteger
alphaNumber

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://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

NameTypeDescription
hexStringString

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://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

NameTypeDescription
hexStringString
alphaNumber

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(color)

Sets the solid fill to the givenThemeColorType.

Parameters

NameTypeDescription
colorThemeColorType

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setSolidFill(color, alpha)

Sets the solid fill to the given alpha andThemeColorType.

Parameters

NameTypeDescription
colorThemeColorType
alphaNumber

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://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.