OverlayIcon

data class OverlayIcon(val base: Icon, val fill: Icon = base) : IconDescriptor(source)

An overlay icon, which can be displayed on top of other icons.

The icon consists of a base and a fill. The base is the actually important image, and the fill is useful for creating some space around the base image. Specifically, the fill is the same as the base, except with everything within the base shape's boundaries also being filled in. For example, if base is a hollow circle, then fill would be a filled-in circle of the same size.

The get function simply returns the base and does not use the fill at all. Instead, the fill is used by OverlayedIcon. When this OverlayIcon is placed on top of some underlying image, the OverlayedIcon will use the fill to perforate the underlying image, and then place the base on top in the newly created empty space. When doing this, the OverlayedIcon will slightly scale up the fill relative to the base so that there is also a slight margin around the base.

Constructors

Link copied to clipboard
constructor(base: Icon, fill: Icon = base)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard
val base: Icon

The underlying base icon; must be square.

Link copied to clipboard
val fill: Icon

A filled-in version of the base; must be the exact same size as the base.

Functions

Link copied to clipboard
open override fun get(): Icon

Creates or returns the described Icon.