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 fields

final int

The tint to apply to everything other than highlightedElement.

final int

The highlight tint to apply to highlightedElement.

final @NonNull RenderParameters.HighlightedElement

The HighlightedElement to draw highlighted with highlightTint.

Public constructors

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

Public methods

boolean
int

Public fields

backgroundTint

@NonNull
public final int backgroundTint

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

highlightTint

@NonNull
public final int highlightTint

The highlight tint to apply to highlightedElement.

highlightedElement

@NonNull
public final @NonNull RenderParameters.HighlightedElement highlightedElement

The HighlightedElement to draw highlighted with highlightTint.

Public constructors

HighlightLayer

public final 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

@NonNull
public boolean equals(@Nullable Object other)

hashCode

@NonNull
public int hashCode()