Package-level declarations

Types

Link copied to clipboard

Save data frames for later retrieval.

Link copied to clipboard

This exception should never be thrown.

Functions

Link copied to clipboard

Given a size and an aspect ratio, resize the area to fit that aspect ratio. If the desired aspect ratio is smaller than the one of the provided size, the size will be cropped to match. If the desired aspect ratio is larger than the that of the provided size, then the size will be expanded to match.

Link copied to clipboard

Determine the aspect ratio of a Size.

Determine the aspect ratio of a SizeF.

Link copied to clipboard
fun <Result> suspend () -> Result.cachedFirstResultSuspend(): suspend () -> Result
fun <Input, Result> suspend (Input) -> Result.cachedFirstResultSuspend(): suspend (Input) -> Result
Link copied to clipboard
fun <Result> cacheFirstResultSuspend(f: suspend () -> Result): suspend () -> Result
fun <Input, Result> cacheFirstResultSuspend(f: suspend (Input) -> Result): suspend (Input) -> Result
Link copied to clipboard

Center a size on a given rectangle. The size may be larger or smaller than the rect.

Link copied to clipboard

Scale a Rect to have a size equivalent to the scaledSize. This will maintain the center position of the Rect.

Link copied to clipboard

Return a rect that is the intersection of two other rects

Link copied to clipboard

Determine the maximum size of rectangle with a given aspect ratio (X/Y) that can fit inside the specified area.

Link copied to clipboard
fun <Result> memoize(f: () -> Result): () -> Result
fun <Input, Result> memoize(f: (Input) -> Result): (Input) -> Result
fun <Result> memoize(validFor: Duration, f: () -> Result): () -> Result
fun <Input, Result> memoize(validFor: Duration, f: (Input) -> Result): (Input) -> Result
fun <Input1, Input2, Result> memoize(validFor: Duration, f: (Input1, Input2) -> Result): (Input1, Input2) -> Result
Link copied to clipboard
Link copied to clipboard
fun <Result> suspend () -> Result.memoizedSuspend(): suspend () -> Result
fun <Input, Result> suspend (Input) -> Result.memoizedSuspend(): suspend (Input) -> Result
fun <Input1, Input2, Result> suspend (Input1, Input2) -> Result.memoizedSuspend(): suspend (Input1, Input2) -> Result
fun <Result> suspend () -> Result.memoizedSuspend(validFor: Duration): suspend () -> Result
fun <Input, Result> suspend (Input) -> Result.memoizedSuspend(validFor: Duration): suspend (Input) -> Result
fun <Input1, Input2, Result> suspend (Input1, Input2) -> Result.memoizedSuspend(validFor: Duration): suspend (Input1, Input2) -> Result
fun <Input1, Input2, Input3, Result> suspend (Input1, Input2, Input3) -> Result.memoizedSuspend(validFor: Duration): suspend (Input1, Input2, Input3) -> Result
Link copied to clipboard
fun <Result> memoizeSuspend(f: suspend () -> Result): suspend () -> Result
fun <Input, Result> memoizeSuspend(f: suspend (Input) -> Result): suspend (Input) -> Result
fun <Input1, Input2, Result> memoizeSuspend(f: suspend (Input1, Input2) -> Result): suspend (Input1, Input2) -> Result
fun <Result> memoizeSuspend(validFor: Duration, f: suspend () -> Result): suspend () -> Result
fun <Input, Result> memoizeSuspend(validFor: Duration, f: suspend (Input) -> Result): suspend (Input) -> Result
fun <Input1, Input2, Result> memoizeSuspend(validFor: Duration, f: suspend (Input1, Input2) -> Result): suspend (Input1, Input2) -> Result
fun <Input1, Input2, Input3, Result> memoizeSuspend(validFor: Duration, f: suspend (Input1, Input2, Input3) -> Result): suspend (Input1, Input2, Input3) -> Result
Link copied to clipboard

Determine the minimum size of rectangle with a given aspect ratio (X/Y) that a specified area can fit inside.

Link copied to clipboard
fun Rect.move(relativeX: Int, relativeY: Int): Rect

Move relative to its current position

Link copied to clipboard

Project a region of interest from one Rect to another. For example, given the rect and region of interest:


Takes a relation between a region of interest and a size and projects the region of interest to that new location

Link copied to clipboard
fun Size.resizeRegion(originalRegion: Rect, newRegion: Rect, newSize: Size): Map<Rect, Rect>

This method allows relocating and resizing a portion of a Size. It returns the required translations required to achieve this relocation. This is useful for zooming in on sections of an image.

Link copied to clipboard

Calculate the new size based on a percentage scale.

Calculate the new size based on percentage scale values.

Link copied to clipboard

Calculate the position of the Size surrounding the surroundedSize. This makes a few assumptions:

Link copied to clipboard

Scale up a Size so that it fills a containingSize while maintaining its original aspect ratio.

Link copied to clipboard

Scale a size based on percentage scale values, and keep track of its position.

Link copied to clipboard

Scale a Rect to have a size equivalent to the scaledSize. This will also scale the position of the Rect.

Link copied to clipboard

Determine the size of a Rect.

Determine the size of a RectF.

Determine the size of a View.

Link copied to clipboard

Converts a size to rectangle with the top left corner at 0,0

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Transpose a size's width and height.

Link copied to clipboard