Most visited

Recently visited

ColorFilterCache

public final class ColorFilterCache
extends Object

java.lang.Object
   ↳ android.support.v17.leanback.graphics.ColorFilterCache


缓存 ColorFilter对于给定的颜色在不同的alpha级别。

Summary

Public methods

static ColorFilterCache getColorFilterCache(int color)

获取给定颜色的ColorDimmer。

ColorFilter getFilterForLevel(float level)

为0到1.0之间的给定alpha级别返回ColorFilter。

Inherited methods

From class java.lang.Object

Public methods

getColorFilterCache

ColorFilterCache getColorFilterCache (int color)

获取给定颜色的ColorDimmer。 只有RGB值被使用; alpha通道在颜色上被忽略。 随后使用相同颜色值调用此方法将返回相同的缓存。

Parameters
color int: The color to use for the color filters.
Returns
ColorFilterCache A cache of ColorFilters at different alpha levels for the color.

getFilterForLevel

ColorFilter getFilterForLevel (float level)

为0到1.0之间的给定alpha级别返回ColorFilter。

Parameters
level float: The alpha level the filter should apply.
Returns
ColorFilter A ColorFilter at the alpha level for the color represented by the cache.

Hooray!