On this pageRectFitIntoRect Transform a rectangle to fit partially or wholly inside another. E.g. an image onto a background canvas@paramSource rectangle, to be resized and/or trimmed@paramDestination rectangle, the available space to contain the result@paramHow to transform sourceRect - whether to keep original aspect ratio and allow/prevent overflow@returnsThe subsection of the sourceRect to take and the rectangle to map it toCallableRectFitIntoRect(sourceRect, destRect, sizeMode): [sourceRectTuple: RectTuple, destRectTuple: RectTuple]ParameterssourceRect: RectdestRect: RectsizeMode: numberReturns [sourceRectTuple: RectTuple, destRectTuple: RectTuple]Index MethodsclearCacheMethods clearCacheclearCache(): voidClears the cache of the memoized functionReturns void
Transform a rectangle to fit partially or wholly inside another. E.g. an image onto a background canvas
Source rectangle, to be resized and/or trimmed
Destination rectangle, the available space to contain the result
How to transform sourceRect - whether to keep original aspect ratio and allow/prevent overflow
The subsection of the sourceRect to take and the rectangle to map it to