Known direct subclasses
Fill.Brush

Fills with a GraphicsBrush.

Fill.Color

Fills with a solid GraphicsColor.

Fill.None

Represents an empty fill with no visual representation.


Specifies visual fill for styling.

A Fill is a value that describes how a region should be filled. "background" or "border color" properties are good candidates for a property of type Fill.

Summary

Nested types

Fills with a GraphicsBrush.

Fills with a solid GraphicsColor.

class Fill.None : Fill

Represents an empty fill with no visual representation.

Public companion properties

Fill

Singleton instance representing no fill.

Cmn

Protected constructors

Cmn

Public functions

abstract Brush?

Return a brush if the Fill is a Fill.Brush, otherwise null.

Cmn
abstract Color

Return the color of this Fill if it is a Fill.Color or Color.Unspecified if Fill.None or Fill.Brush.

Cmn
open Any?
lerp(other: Any?, t: Float)

This method is defined such that a value of t being 1.0 means that the interpolation has finished, meaning that this method should return either other (or something equivalent to other), 0.0 meaning that the interpolation has not started, returning this (or something equivalent to this), and values in between meaning that the interpolation is at the relevant point on the timeline between this and other.

Cmn

Public companion properties

None

val NoneFill

Singleton instance representing no fill.

Protected constructors

Fill

protected Fill()

Public functions

asBrush

abstract fun asBrush(): Brush?

Return a brush if the Fill is a Fill.Brush, otherwise null.

asColor

abstract fun asColor(): Color

Return the color of this Fill if it is a Fill.Color or Color.Unspecified if Fill.None or Fill.Brush.

lerp

open fun lerp(other: Any?, t: Float): Any?

This method is defined such that a value of t being 1.0 means that the interpolation has finished, meaning that this method should return either other (or something equivalent to other), 0.0 meaning that the interpolation has not started, returning this (or something equivalent to this), and values in between meaning that the interpolation is at the relevant point on the timeline between this and other. The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid.

Note that the type of other may not be the same as the type of this, however if the implementation knows how to losslessly convert from one type to another, the conversion can be made in order to optimistically provide a valid interpolation.

If other is null, this can be interpreted as interpolating between "nothing" or, "no effect", into whatever the value of this is. In this case, if it is possible to construct a version of this type that is visually or semantically equivalent to "no effect", then it might make sense to return an interpolation between that value and this.

If there is no known way to interpolate between the two values, the implementation should return null.

Parameters
other: Any?

The other object to be intorpolated with this one.

t: Float

The position on the timeline. This is usually between 0 and 1, but it is valid for it to be outside of this range.

Returns
Any?

The interpolated object.

See also
Interpolatable

#lerp