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

IntSize

value public final class IntSize


A two-dimensional size class used for measuring in Int pixels.

Summary

Nested types

public static class IntSize.Companion

Public methods

final int
final int
final @NonNull IntSize
div(int other)

Returns an IntSize scaled by dividing width and height by other

final int

The vertical aspect of the size in Int pixels.

final int

The horizontal aspect of the size in Int pixels.

final @NonNull IntSize
times(int other)

Returns an IntSize scaled by multiplying width and height by other

@NonNull String

Extension functions

final @NonNull IntOffset

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

final @NonNull IntRect

Convert a IntSize to a IntRect.

final @NonNull Size

Public methods

component1

public final int component1()

component2

public final int component2()

div

public final @NonNull IntSize div(int other)

Returns an IntSize scaled by dividing width and height by other

getHeight

public final int getHeight()

The vertical aspect of the size in Int pixels.

getWidth

public final int getWidth()

The horizontal aspect of the size in Int pixels.

times

public final @NonNull IntSize times(int other)

Returns an IntSize scaled by multiplying width and height by other

toString

public @NonNull String toString()

Extension functions

IntSizeKt.getCenter

public final @NonNull IntOffset IntSizeKt.getCenter(@NonNull IntSize receiver)

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

IntSizeKt.toIntRect

public final @NonNull IntRect IntSizeKt.toIntRect(@NonNull IntSize receiver)

Convert a IntSize to a IntRect.

IntSizeKt.toSize

public final @NonNull Size IntSizeKt.toSize(@NonNull IntSize receiver)