ComplicationHighlightRenderer

public final class ComplicationHighlightRenderer


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

Summary

Public constructors

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

Public methods

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

Intended for use by CanvasComplicationDrawable.drawHighlight.

Public constructors

ComplicationHighlightRenderer

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

Public methods

drawComplicationHighlight

public final void drawComplicationHighlight(Canvas canvas, 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.