{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

IntSizeKt

public final class IntSizeKt


Summary

Public methods

static final @NonNull IntSize
IntSize(int width, int height)

Constructs an IntSize from width and height Int values.

static final @NonNull IntOffset

Returns the IntOffset of the center of the rect from the point of 0, 0 with this IntSize.

static final @NonNull IntSize
times(int receiver, @NonNull IntSize size)

Returns an IntSize with size's IntSize.width and IntSize.height multiplied by this.

static final @NonNull IntRect

Convert a IntSize to a IntRect.

static final @NonNull Size
toSize(@NonNull IntSize receiver)

Public methods

IntSize

public static final @NonNull IntSize IntSize(int width, int height)

Constructs an IntSize from width and height Int values.

getCenter

public static final @NonNull IntOffset getCenter(@NonNull IntSize receiver)

Returns the IntOffset of the center of the rect from the point of 0, 0 with this IntSize.

times

public static final @NonNull IntSize times(int receiver, @NonNull IntSize size)

Returns an IntSize with size's IntSize.width and IntSize.height multiplied by this.

toIntRect

public static final @NonNull IntRect toIntRect(@NonNull IntSize receiver)

Convert a IntSize to a IntRect.

toSize

public static final @NonNull Size toSize(@NonNull IntSize receiver)