RenderParameters.HighlightLayer


public final class RenderParameters.HighlightLayer


The definition of what to include in the highlight layer.

The highlight layer is used by editors to show the parts of the watch face affected by a setting. E.g. a set of ComplicationSlots or a user style setting.

The highlight layer is composited on top of the watch face with an alpha blend. It should be cleared with backgroundTint. The solid or semi-transparent outline around highlightedElement should be rendered using the provided highlightTint. The highlighted element itself should be rendered as fully transparent (an alpha value of 0) to leave it unaffected.

Summary

Public constructors

HighlightLayer(
    @NonNull RenderParameters.HighlightedElement highlightedElement,
    @ColorInt int highlightTint,
    @ColorInt int backgroundTint
)

Public methods

boolean
equals(Object other)
final @ColorInt int

The tint to apply to everything other than highlightedElement.

final @ColorInt int

The highlight tint to apply to highlightedElement.

final @NonNull RenderParameters.HighlightedElement

The HighlightedElement to draw highlighted with highlightTint.

int

Public constructors

HighlightLayer

Added in 1.0.0
public HighlightLayer(
    @NonNull RenderParameters.HighlightedElement highlightedElement,
    @ColorInt int highlightTint,
    @ColorInt int backgroundTint
)
Parameters
@NonNull RenderParameters.HighlightedElement highlightedElement

The HighlightedElement to draw highlighted with highlightTint.

@ColorInt int highlightTint

The highlight tint to apply to highlightedElement.

@ColorInt int backgroundTint

The tint to apply to everything other than highlightedElement. Typically this will darken everything else to increase contrast.

Public methods

equals

public boolean equals(Object other)

getBackgroundTint

Added in 1.0.0
public final @ColorInt int getBackgroundTint()

The tint to apply to everything other than highlightedElement. Typically this will darken everything else to increase contrast.

getHighlightTint

Added in 1.0.0
public final @ColorInt int getHighlightTint()

The highlight tint to apply to highlightedElement.

getHighlightedElement

Added in 1.0.0
public final @NonNull RenderParameters.HighlightedElement getHighlightedElement()

The HighlightedElement to draw highlighted with highlightTint.

hashCode

public int hashCode()