public final class AtmosphereEffect extends Object implements AutoCloseable
This effect is only applied in 3D views.
If the view has a geocentric reference, an atmospheric glow effect is drawn around the globe. The colors of this glow can be configured using setHorizonColor()
and setSkyColor()
.
You cannot create an AtmosphereEffect
. Instead, you can retrieve it from GraphicsEffects#getAtmosphere
.
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
android.graphics.Color |
getHorizonColor()
Returns the horizon color.
|
android.graphics.Color |
getSkyColor()
Returns the sky color.
|
boolean |
isEnabled()
Returns if the atmosphere effect is enabled.
|
void |
setEnabled(boolean enabled)
Enables or disables the atmosphere effect.
|
void |
setHorizonColor(android.graphics.Color color)
Sets the horizon color.
|
void |
setSkyColor(android.graphics.Color color)
Sets the sky color.
|
public void close()
close
in interface AutoCloseable
public boolean isEnabled()
public void setEnabled(boolean enabled)
The default is true
.
enabled
- true to enable the atmosphere effect or false to disable it.@NotNull public android.graphics.Color getSkyColor()
Only used in geocentric views, where a gradient going from getHorizonColor()
to getSkyColor()
will be visible on the horizon.
public void setSkyColor(@NotNull android.graphics.Color color)
color
- the sky color.@NotNull public android.graphics.Color getHorizonColor()
Only used in geocentric views, where a gradient going from getHorizonColor()
to getSkyColor()
will be visible on the horizon.
public void setHorizonColor(@NotNull android.graphics.Color color)
color
- the horizon color.