projectRegionOfInterest

fun SizeF.projectRegionOfInterest(toSize: SizeF, regionOfInterest: RectF): RectF
fun Size.projectRegionOfInterest(toSize: Size, regionOfInterest: Rect): Rect

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


fun RectF.projectRegionOfInterest(toSize: SizeF, regionOfInterest: RectF): RectF
fun Rect.projectRegionOfInterest(toSize: Size, regionOfInterest: Rect): Rect


fun RectF.projectRegionOfInterest(toRect: RectF, regionOfInterest: RectF): RectF
fun Rect.projectRegionOfInterest(toRect: Rect, regionOfInterest: Rect): Rect

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

| | | _ | | || | | | |______|

When projected to the following region:

| | | | |___________|

The position and size of the region of interest are scaled to the new rect.