ComplicationHighlightRenderer


public final class ComplicationHighlightRenderer


Helper for rendering a thick outline around a complication to highlight it.

use Watch Face Format instead

Summary

Public constructors

ComplicationHighlightRenderer(
    @Px float outlineExpansion,
    @Px float outlineStrokeWidth
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public methods

final void
drawComplicationHighlight(
    @NonNull Canvas canvas,
    @NonNull Rect bounds,
    @ColorInt int color
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

ComplicationHighlightRenderer

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public ComplicationHighlightRenderer(
    @Px float outlineExpansion,
    @Px float outlineStrokeWidth
)

Public methods

drawComplicationHighlight

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void drawComplicationHighlight(
    @NonNull Canvas canvas,
    @NonNull Rect bounds,
    @ColorInt int color
)

Intended for use by CanvasComplicationDrawable.drawHighlight. Draws a thick line around the complication with color and with the given bounds. Fills the center of the complication with transparent white. When composited on top of the underlying watchface the complication's original pixels will be preserved with their original brightness.