ComplicationHighlightRenderer


class ComplicationHighlightRenderer


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

Summary

Public constructors

ComplicationHighlightRenderer(
    outlineExpansion: @Px Float,
    outlineStrokeWidth: @Px Float
)

Public functions

Unit
drawComplicationHighlight(canvas: Canvas, bounds: Rect, color: @ColorInt Int)

Intended for use by CanvasComplicationDrawable.drawHighlight.

Public constructors

ComplicationHighlightRenderer

Added in 1.0.0
ComplicationHighlightRenderer(
    outlineExpansion: @Px Float,
    outlineStrokeWidth: @Px Float
)

Public functions

drawComplicationHighlight

Added in 1.0.0
fun drawComplicationHighlight(canvas: Canvas, bounds: Rect, color: @ColorInt Int): Unit

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.