Skip to main content

RectFitIntoRect

Transform a rectangle to fit partially or wholly inside another. E.g. an image onto a background canvas

@param

Source rectangle, to be resized and/or trimmed

@param

Destination rectangle, the available space to contain the result

@param

How to transform sourceRect - whether to keep original aspect ratio and allow/prevent overflow

@returns

The subsection of the sourceRect to take and the rectangle to map it to

Callable

  • RectFitIntoRect(sourceRect, destRect, sizeMode): [sourceRectTuple: RectTuple, destRectTuple: RectTuple]

Index

Methods

Methods

clearCache

  • clearCache(): void
  • Clears the cache of the memoized function


    Returns void

Page Options