OffsetSchema

@Serializable
data class OffsetSchema(val x: Int? = null, val y: Int? = null)

A two-dimensional position used by gradient BackgroundSchema variants.

Both axes are expressed in dp and are relative to the top-start corner of the tile's drawing area. A null axis maps to Float.POSITIVE_INFINITY, which Compose interprets as "the far right (x) or far bottom (y) of the drawing area" — this is how the far edge of a gradient is expressed without knowing the tile size upfront.

Constants:

  • ZeroOffset.Zero, the top-start corner.

  • InfiniteOffset.Infinite, the bottom-end corner.

DSL helper (mosaic-server):

offset(x = 40, y = 40)   // 40dp, 40dp
offset(x = 0) // 0dp, bottom edge
offset() // bottom-end corner

Constructors

Link copied to clipboard
constructor(x: Int? = null, y: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "x")
val x: Int?
Link copied to clipboard
@SerialName(value = "y")
val y: Int?